View source: R/bage_mod-methods.R
tidy.bage_mod | R Documentation |
Summarize the intercept, main effects, and interactions from a fitted model.
## S3 method for class 'bage_mod'
tidy(x, ...)
x |
Object of class |
... |
Unused. Included for generic consistency only. |
The tibble returned by tidy()
contains the following columns:
term
Name of the intercept, main effect, or interaction
prior
Specification for prior
n_par
Number of parameters
n_par_free
Number of free parameters
std_dev
Standard deviation for point estimates.
With some priors, the number of free parameters is less than
the number of parameters for that term. For instance, an SVD()
prior might use three vectors to represent 101 age groups
so that the number of parameters is 101, but the number of
free parameters is 3.
std_dev
is the standard deviation across elements of a
term, based on point estimates of those elements.
For instance, if the point
estimates for a term with three elements are
0.3, 0.5, and 0.1, then the value for std_dev
is
sd(c(0.3, 0.5, 0.1))
std_dev
is a measure of the contribution of a term to
variation in the outcome variable.
A tibble
std_dev
is modified from Gelman et al. (2014)
Bayesian Data Analysis. Third Edition. pp396–397.
augment()
Extract data, and values for rates,
probabilities, or means
components()
Extract values for hyper-parameters
mod <- mod_pois(injuries ~ age + sex + year,
data = nzl_injuries,
exposure = popn)
mod <- fit(mod)
tidy(mod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.