The rstanarm model-fitting functions return an object of class
'stanreg', which is a list containing at a minimum the components listed
below. Each stanreg object will also have additional classes (e.g. 'aov',
'betareg', 'glm', 'polr', etc.) and several additional components depending
on the model and estimation algorithm.
Some additional details apply to models estimated using the stan_mvmer
or stan_jm modelling functions. The stan_mvmer modelling
function returns an object of class 'stanmvreg', which inherits the
'stanreg' class, but has a number of additional elements described in the
subsection below. The stan_jm modelling function returns an object of class
'stanjm', which inherits both the 'stanmvreg' and 'stanreg'
classes, but has a number of additional elements described in the subsection below.
Both the 'stanjm' and 'stanmvreg' classes have several of their own
methods for situations in which the default 'stanreg' methods are not
suitable; see the See Also section below.
Note
The stan_biglm function is an exception. It returns a
stanfit object rather than a stanreg object.
Elements for stanreg objects
coefficientsPoint estimates, as described in
print.stanreg.sesStandard errors based on
mad, as described inprint.stanreg.residualsResiduals of type
'response'.fitted.valuesFitted mean values. For GLMs the linear predictors are transformed by the inverse link function.
linear.predictorsLinear fit on the link scale. For linear models this is the same as
fitted.values.covmatVariance-covariance matrix for the coefficients based on draws from the posterior distribution, the variational approximation, or the asymptotic sampling distribution, depending on the estimation algorithm.
model,x,yIf requested, the the model frame, model matrix and response variable used, respectively.
familyThe
familyobject used.callThe matched call.
formulaThe model
formula.data,offset,weightsThe
data,offset, andweightsarguments.algorithmThe estimation method used.
prior.infoA list with information about the prior distributions used.
stanfit,stan_summaryThe object of
stanfit-classreturned by RStan and a matrix of various summary statistics from the stanfit object.rstan_versionThe version of the rstan package that was used to fit the model.
Elements for stanmvreg objects
-
The stanmvreg objects contain the majority of the elements described
above for stanreg objects, but in most cases these will be a list with each
elements of the list correponding to one of the submodels (for example,
the family element of a stanmvreg object will be a list with each
element of the list containing the family object for one
submodel). In addition, stanmvreg objects contain the following additional
elements:
cnmsThe names of the grouping factors and group specific parameters, collapsed across the longitudinal or glmer submodels.
flevelsThe unique factor levels for each grouping factor, collapsed across the longitudinal or glmer submodels.
n_markersThe number of longitudinal or glmer submodels.
n_yobsThe number of observations for each longitudinal or glmer submodel.
n_grpsThe number of levels for each grouping factor (for models estimated using
stan_jm, this will be equal ton_subjectsif the individual is the only grouping factor).runtimeThe time taken to fit the model (in minutes).
Additional elements for stanjm objects
-
The stanjm objects contain the elements described above for
stanmvreg objects, but also contain the following additional
elements:
id_var,time_varThe names of the variables distinguishing between individuals, and representing time in the longitudinal submodel.
n_subjectsThe number of individuals.
n_eventsThe number of non-censored events.
eventtime,statusThe event (or censoring) time and status indicator for each individual.
basehazA list containing information about the baseline hazard.
assocAn array containing information about the association structure.
epsilonThe width of the one-sided difference used to numerically evaluate the slope of the longitudinal trajectory; only relevant if a slope-based association structure was specified (e.g. etaslope, muslope, etc).
qnodesThe number of Gauss-Kronrod quadrature nodes used to evaluate the cumulative hazard in the joint likelihood function.