You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the better workflow is to do all mutations to the draws beforehand (i.e. adding the theta) and then the sensitivity analysis.
Two options that might offer a better workflow:
data_bin<-data.frame(N= c(10), y= c(7))
fit_bin<- brm(y| trials(N) ~1, family= binomial(), data=data_bin, refresh=0, backend="cmdstanr")
# here we manually add the log_liks into the draws object before power-scalingfit_bin|>
as_draws_df() |>
mutate_variables(theta= plogis(b_Intercept)) |>
bind_draws(log_lik_draws(fit_bin)) |>
powerscale_sensitivity(variable="theta")
# here we specify the fit object in the power-scaling call, which calculates the log_liksfit_bin|>
as_draws_df() |>
mutate_variables(theta= plogis(b_Intercept)) |>
powerscale_sensitivity(fit=fit_bin, variable="theta")
A simple binomial model and data, and we compute
theta=plogis(b_Intercept)
As
prediction
appends the draws, the following prints sensitivity results also forb_Intercept
Adding option
variable='theta'
causes an error
Error: The following variables are missing in the draws object: {'theta'}
Adding option
variable='theta'
causes an error
Error in prediction(x, ...) : unused argument (variable = "b_Intercept")
It would be nice to be able to focus only on the quantities of interest.
The text was updated successfully, but these errors were encountered: