| get_priors | R Documentation |
Extracts the priors used in the dynamite model as a data frame. You
can then alter the priors by changing the contents of the prior column and
supplying this data frame to dynamite function using the argument
priors. See vignettes for details.
get_priors(x, ...)
## S3 method for class 'dynamiteformula'
get_priors(x, data, time, group = NULL, ...)
## S3 method for class 'dynamitefit'
get_priors(x, ...)
x |
[ |
... |
Ignored. |
data |
[ |
time |
[ |
group |
[ |
A data.frame containing the prior definitions.
Only the prior column of the output should be altered when defining
the user-defined priors for dynamite.
Model fitting
dynamice(),
dynamite(),
update.dynamitefit()
data.table::setDTthreads(1) # For CRAN
d <- data.frame(y = rnorm(10), x = 1:10, time = 1:10, id = 1)
get_priors(obs(y ~ x, family = "gaussian"),
data = d, time = "time", group = "id"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.