Last data update: 2014.03.03

R: Extract Model Residuals
residualsR Documentation

Extract Model Residuals

Description

Extract residuals from a model fitted using a model fitting function plmm or wplmm. resid is an alias.

Usage

## S3 method for class 'plmm'
residuals(object,...)
## S3 method for class 'wplmm'
residuals(object,...)
## S3 method for class 'plmm'
resid(object,...)
## S3 method for class 'wplmm'
resid(object,...)

Arguments

object

a model fitted with plmm or wplmm.

...

other arguments.

Details

The residual is defined as the value obtained by subtracting from the response value the estimated fixed components and the predicted random intercept of the cluster the observational unit of the response belongs to.

See Also

plmm, wplmm

Examples

data(plmm.data)
model <- plmm(y0~x1+x2+x3|t1, random=cluster, data=plmm.data)
residuals(model)

Results