View source: R/summary.mvgam.R
| summary.mvgam | R Documentation |
These functions take a fitted mvgam or jsdgam object and
return various useful summaries
## S3 method for class 'mvgam'
summary(object, include_betas = TRUE, smooth_test = TRUE, digits = 2, ...)
## S3 method for class 'mvgam_prefit'
summary(object, ...)
## S3 method for class 'mvgam'
coef(object, summarise = TRUE, ...)
object |
|
include_betas |
Logical. Print a summary that includes posterior
summaries of all linear predictor beta coefficients (including spline
coefficients)? Defaults to |
smooth_test |
Logical. Compute estimated degrees of freedom and
approximate p-values for smooth terms? Defaults to |
digits |
The number of significant digits for printing out the summary;
defaults to |
... |
Ignored |
summarise |
|
summary.mvgam and summary.mvgam_prefit return brief summaries of
the model's call, along with posterior intervals for some of the key
parameters in the model. Note that some smooths have extra penalties on the
null space, so summaries for the rho parameters may include more
penalty terms than the number of smooths in the original model formula.
Approximate p-values for smooth terms are also returned, with methods used
for their calculation following those used for mgcv equivalents (see
summary.gam for details). The Estimated Degrees of
Freedom (edf) for smooth terms is computed using either edf.type = 1 for
models with no trend component, or edf.type = 0 for models with trend
components. These are described in the documentation for
jagam. Experiments suggest these p-values tend to be
more conservative than those that might be returned from an equivalent model
fit with summary.gam using method = 'REML'
coef.mvgam returns either summaries or full posterior estimates for GAM
component coefficients
For summary.mvgam, an object of class mvgam_summary containing:
model_spec: Model specification details (formulas, family, dimensions)
parameters: Parameter estimates and significance tests
diagnostics: MCMC convergence diagnostics
sampling_info: Sampling algorithm details
For summary.mvgam_prefit, a list is printed on-screen showing
the model specifications
For coef.mvgam, either a matrix of posterior coefficient
distributions (if summarise == FALSE or data.frame of
coefficient summaries)
Nicholas J Clark
## Not run:
simdat <- sim_mvgam(seasonality = "hierarchical")
mod <- mvgam(
y ~ series +
s(season, bs = "cc", k = 6) +
s(season, series, bs = "fs", k = 4),
data = simdat$data_train,
chains = 2,
silent = 2
)
mod_summary <- summary(mod)
mod_summary
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.