stanreg-methods: Methods for stanreg objects

Description Usage Arguments Details See Also

Description

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
## 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 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.

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

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:

residuals

Residuals are always of type "response" (not "deviance" residuals or any other type). However, in the case of stan_polr with more than two response categories, the residuals are the difference between the latent utility and its linear predictor.

coef

Medians are used for point estimates. See the Point estimates section in print.stanreg for more details.

se

The se function returns standard errors based on mad. See the Uncertainty estimates section in print.stanreg for more details.

confint

For models fit using optimization, confidence intervals are returned via a call to confint.default. If algorithm is "sampling", "meanfield", or "fullrank", the confint will throw an error because the posterior_interval function should be used to compute Bayesian uncertainty intervals.

nsamples

The number of draws from the posterior distribution obtained

See Also


rstanarm documentation built on Feb. 11, 2020, 5:06 p.m.