| mvgam-class {mvgam} | R Documentation |
Fitted mvgam object description
Description
A fitted mvgam object returned by function mvgam.
Run methods(class = "mvgam") to see an overview of available methods.
Details
A mvgam object contains the following elements:
-
callthe original observation model formula -
trend_callIf atrend_formula was supplied, the original trend model formula is returned. OtherwiseNULL -
familycharacterdescription of the observation distribution -
trend_modelcharacterdescription of the latent trend model -
trend_mapdata.framedescribing the mapping of trend states to observations, if supplied in the original model. OtherwiseNULL -
driftLogical specifying whether a drift term was used in the trend model -
priorsIf the model priors were updated from their defaults, the priordataframewill be returned. OtherwiseNULL -
model_outputTheMCMCobject returned by the fitting engine. If the model was fitted usingStan, this will be an object of classstanfit(seestanfit-classfor details). IfJAGSwas used as the backend, this will be an object of classrunjags(seerunjags-classfor details) -
model_fileThecharacterstring model file used to describe the model in eitherStanorJAGSsyntax -
model_dataIfreturn_model_datawas set toTRUEwhen fitting the model, thelistobject containing all data objects needed to condition the model is returned. Each item in thelistis described in detail at the top of themodel_file. OtherwiseNULL -
initsIfreturn_model_datawas set toTRUEwhen fitting the model, the initial value functions used to initialise the MCMC chains will be returned. OtherwiseNULL -
monitor_parsThe parameters that were monitored during MCMC sampling are returned as acharacter vector -
sp_namesAcharacter vectorspecifying the names for each smoothing parameter -
mgcv_modelAn object of classgamcontaining themgcvversion of the observation model. This object is used for generating the linear predictor matrix when making predictions for new data. The coefficients in this model object will contain the posterior median coefficients from the GAM linear predictor, but these are only used if generating plots of smooth functions thatmvgamcurrently cannot handle (such as plots for three-dimensional smooths). This model therefore should not be used for inference. SeegamObjectfor details -
trend_mgcv_modelIf atrend_formula was supplied, an object of classgamcontaining themgcvversion of the trend model. OtherwiseNULL -
ytimesThematrixobject used in model fitting for indexing which series and timepoints were observed in each row of the supplied data. Used internally by some downstream plotting and prediction functions -
residsA namedlistobject containing posterior draws of Dunn-Smyth randomized quantile residuals -
use_lvLogical flag indicating whether latent dynamic factors were used in the model -
n_lvIfuse_lv == TRUE, the number of latent dynamic factors used in the model -
upper_boundsIf bounds were supplied in the original model fit, they will be returned. OtherwiseNULL -
obs_dataThe original data object (either alistordataframe) supplied in model fitting. -
test_dataIf test data were supplied (as argumentnewdatain the original model), it will be returned. OthweriseNULL -
fit_engineCharacterdescribing the fit engine, either asstanorjags -
backendCharacterdescribing the backend used for modelling, either asrstan,cmdstanrorrjags -
algorithmCharacterdescribing the algorithm used for finding the posterior, either assampling,laplace,pathfinder,meanfieldorfullrank -
max_treedepthIf the model was fitted usingStan, the value supplied for the maximum treedepth tuning parameter is returned (seestanfor details). OtherwiseNULL -
adapt_deltaIf the model was fitted usingStan, the value supplied for the adapt_delta tuning parameter is returned (seestanfor details). OtherwiseNULL
Author(s)
Nicholas J Clark