stapreg-methods: Methods for stapreg objects

stapreg-methodsR Documentation

Methods for stapreg objects

Description

The methods documented on this page are actually some of the least important methods defined for stapreg 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 'stapreg'
coef(object, ...)

## S3 method for class 'stapreg'
confint(object, ...)

## S3 method for class 'stapreg'
fitted(object, ...)

## S3 method for class 'stapreg'
nobs(object, ...)

## S3 method for class 'stapreg'
nstap(object)

## S3 method for class 'stapreg'
ntap(object)

## S3 method for class 'stapreg'
nsap(object)

## S3 method for class 'stapreg'
nfix(object, ...)

## S3 method for class 'stapreg'
residuals(object, ...)

## S3 method for class 'stapreg'
se(object, ...)

## S3 method for class 'stapreg'
vcov(object, correlation = FALSE, ...)

## S3 method for class 'stapreg'
fixef(object, ...)

## S3 method for class 'stapreg'
ngrps(object, ...)

## S3 method for class 'stapreg'
ranef(object, ...)

## S3 method for class 'stapreg'
sigma(object, ...)

## S3 method for class 'stapreg'
VarCorr(x, sigma = 1, ...)

Arguments

object, x

A fitted model object returned by one of the rstap modeling functions. See stapreg-objects.

...

Ignored

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).

coef

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

se

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

confint

confint will throw an error because the posterior_interval function should be used to compute Bayesian uncertainty intervals.

See Also

  • The print, summary, and prior_summary methods for stapreg objects for information on the fitted model.

  • The plot method to plot estimates and diagnostics.

  • The posterior_predict and predictive_error methods for predictions and predictive errors - can be used for posterior predictive checks.

  • The posterior_interval and predictive_interval methods for uncertainty intervals for model parameters and predictions.

  • log_lik method for computing the log-likelihood of (possibly new) data.

  • The as.matrix, as.data.frame, and as.array methods to access posterior draws.


Biostatistics4SocialImpact/rstap documentation built on Aug. 1, 2022, 1:15 p.m.