The methods documented on this page are actually some of the least important methods defined for stanreg objects. The most important methods are documented separately, each with its own page. Links to those pages are provided in the See Also section, below.
Usage
# S3 method for class 'stanmvreg'
nobs(object, ...)
# S3 method for class 'stanreg'
coef(object, ...)
# S3 method for class 'stanreg'
confint(object, parm, level = 0.95, ...)
# S3 method for class 'stanreg'
fitted(object, ...)
# S3 method for class 'stanreg'
nobs(object, ...)
# S3 method for class 'stanreg'
residuals(object, ...)
# S3 method for class 'stanreg'
se(object, ...)
# S3 method for class 'stanreg'
update(object, formula., ..., evaluate = TRUE)
# S3 method for class 'stanreg'
vcov(object, correlation = FALSE, ...)
# S3 method for class 'stanreg'
fixef(object, ...)
# S3 method for class 'stanreg'
ngrps(object, ...)
# S3 method for class 'stanreg'
nsamples(object, ...)
# S3 method for class 'stanreg'
ranef(object, ...)
# S3 method for class 'stanreg'
sigma(object, ...)
# S3 method for class 'stanreg'
VarCorr(x, sigma = 1, ...)Arguments
- object, x
A fitted model object returned by one of the rstanarm modeling functions. See
stanreg-objects.- ...
Ignored, except by the
updatemethod. Seeupdate.- parm
For
confint, an optional character vector of parameter names.- level
For
confint, a scalar between \(0\) and \(1\) indicating the confidence level to use.- formula., evaluate
See
update.- correlation
For
vcov, ifFALSE(the default) the covariance matrix is returned. IfTRUE, the correlation matrix is returned instead.- sigma
Ignored (included for compatibility with
VarCorr).
Details
The methods documented on this page are similar to the methods defined for objects of class 'lm', 'glm', 'glmer', etc. However there are a few key differences:
residualsResiduals are always of type
"response"(not"deviance"residuals or any other type). However, in the case ofstan_polrwith more than two response categories, the residuals are the difference between the latent utility and its linear predictor.coefMedians are used for point estimates. See the Point estimates section in
print.stanregfor more details.seThe
sefunction returns standard errors based onmad. See the Uncertainty estimates section inprint.stanregfor more details.confintFor models fit using optimization, confidence intervals are returned via a call to
confint.default. Ifalgorithmis"sampling","meanfield", or"fullrank", theconfintwill throw an error because theposterior_intervalfunction should be used to compute Bayesian uncertainty intervals.nsamplesThe number of draws from the posterior distribution obtained
See also
The
print,summary, andprior_summarymethods for stanreg objects for information on the fitted model.launch_shinystanto use the ShinyStan GUI to explore a fitted rstanarm model.The
plotmethod to plot estimates and diagnostics.The
pp_checkmethod for graphical posterior predictive checking.The
posterior_predictandpredictive_errormethods for predictions and predictive errors.The
posterior_intervalandpredictive_intervalmethods for uncertainty intervals for model parameters and predictions.The
loo,kfold, andlog_likmethods for leave-one-out or K-fold cross-validation, model comparison, and computing the log-likelihood of (possibly new) data.The
as.matrix,as.data.frame, andas.arraymethods to access posterior draws.