resid.fixest {fixest}R Documentation

Extracts residuals from a fixest object

Description

This function extracts residuals from a fitted model estimated with femlm, feols or feglm.

Usage

## S3 method for class 'fixest'
resid(object, ...)

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

Arguments

object

A fixest object. Obtained using the functions femlm, feols or feglm.

...

Not currently used.

Details

The residuals returned are the difference between the dependent variable and the expected predictor.

Value

It returns a numeric vector of the length the number of observations used for the estimation.

Author(s)

Laurent Berge

See Also

See also the main estimation functions femlm, feols or feglm. fitted.fixest, predict.fixest, summary.fixest, vcov.fixest, fixef.fixest.

Examples


# simple estimation on iris data, clustering by "Species"
res_poisson = femlm(Sepal.Length ~ Sepal.Width + Petal.Length +
                    Petal.Width | Species, iris)

# we plot the residuals
plot(resid(res_poisson))


[Package fixest version 0.1.0 Index]