tidy.bage_mod {bage} | R Documentation |
Summarize Terms from a Fitted Model
Description
Summarize the intercept, main effects, and interactions from a fitted model.
Usage
## S3 method for class 'bage_mod'
tidy(x, ...)
Arguments
x |
Object of class |
... |
Unused. Included for generic consistency only. |
Details
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.
Value
A tibble
References
std_dev
is modified from Gelman et al. (2014)
Bayesian Data Analysis. Third Edition. pp396–397.
See Also
-
augment()
Extract values for rates, probabilities, or means, together with original data -
components()
Extract values for hyper-parameters
Examples
mod <- mod_pois(injuries ~ age + sex + year,
data = nzl_injuries,
exposure = popn)
mod <- fit(mod)
tidy(mod)