Learn R Programming

rstanarm (version 2.9.0-3)

stanreg-methods: Methods for stanreg objects

Description

S3 methods for stanreg objects. There are also several methods (listed in See Also, below) with their own individual help pages.

Usage

## 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': log_lik(object, newdata = NULL, ...)

## 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': 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 update method. See update.
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.
newdata
For log_lik, an optional data frame of new data (e.g. holdout data). See posterior_predict.
formula., evaluate
See update.
correlation
For vcov, if FALSE (the default) the covariance matrix is returned. If TRUE, the correlation matrix is returned instead.
sigma
Ignored (included for compatibility with VarCorr).

Details

Most of these methods are similar to the methods defined for objects of class 'lm', 'glm', 'glmer', etc. However there are a few exceptions: [object Object],[object Object],[object Object],[object Object],[object Object]

See Also

Other S3 methods for stanreg objects, which have separate documentation, including as.matrix.stanreg, plot.stanreg, predict.stanreg, print.stanreg, and summary.stanreg.

posterior_interval and posterior_predict for alternatives to confint and predict for models fit using MCMC or variational approximation.