get_y: Extract X, Y or Z from a stapreg object

Description Usage Arguments Value Elements for stapreg objects

View source: R/misc.R

Description

The rstap model-fitting functions return an object of class 'stapreg', which is a list containing at a minimum the components listed below. Each stapreg object will also have additional classes (e.g. 'glm') and several additional components depending on the model and estimation algorithm.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
get_y(object, ...)

get_z(object, ...)

get_x(object, ...)

get_w(object, ...)

get_z(object, ...)

## Default S3 method:
get_z(object, ...)

## Default S3 method:
get_x(object, ...)

Arguments

object

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

...

Other arguments passed to methods. For a stanmvreg object this can be an integer m specifying the submodel.

Value

For get_x and get_z, a matrix. For get_y, either a vector or a matrix, depending on how the response variable was specified.

Elements for stapreg objects

coefficients

Point estimates, as described in print.stapreg.

ses

Standard errors based on mad, as described in print.stapreg.

residuals

Residuals of type 'response'.

fitted.values

Fitted mean values. For GLMs the linear predictors are transformed by the inverse link function.

linear.predictors

Linear fit on the link scale. For linear models this is the same as fitted.values.

covmat

Variance-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,y,z

If requested, the the model frame, model matrix and response variable used, respectively. Note that z corresponds to the fixed covariates, z to the spatial aggregated covariates, and y the response.

family

The family object used.

call

The matched call.

formula

The model formula.

data,offset,weights

The data, offset, and weights arguments.

prior.info

A list with information about the prior distributions used.

stapfit,stan_summary

The object of stanfit-class returned by RStan and a matrix of various summary statistics from the stapfit object.

rstan_version

The version of the rstan package that was used to fit the model.


rstap documentation built on May 1, 2019, 9:21 p.m.