create_priorsense_data.brmsfit | R Documentation |
The create_priorsense_data.brmsfit
method can be used to
create the data structure needed by the priorsense package
for performing power-scaling sensitivity analysis. This method is
called automatically when performing powerscaling via
powerscale
or other related
functions, so you will rarely need to call it manually yourself.
create_priorsense_data.brmsfit(x, ...)
x |
A |
... |
Currently unused. |
A priorsense_data
object to be used in conjunction
with the priorsense package.
## Not run:
# fit a model with non-uniform priors
fit <- brm(rating ~ treat + period + carry,
data = inhaler, family = sratio(),
prior = set_prior("normal(0, 0.5)"))
summary(fit)
# The following code requires the 'priorsense' package to be installed:
library(priorsense)
# perform power-scaling of the prior
powerscale(fit, alpha = 1.5, component = "prior")
# perform power-scaling sensitivity checks
powerscale_sensitivity(fit)
# create power-scaling sensitivity plots (for one variable)
powerscale_plot_dens(fit, variable = "b_treat")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.