Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

hatvalues.fixest

Hat values for fixest objects


Description

Computes the hat values for feols or feglm estimations. Only works when there are no fixed-effects.

Usage

## S3 method for class 'fixest'
hatvalues(model, ...)

Arguments

model

A fixest object. For instance from feols or feglm.

...

Not currently used.

Details

Hat values are not available for fenegbin, femlm and feNmlm estimations.

When there are fixed-effects, the hat values of the reduced form are different from the hat values of the full model. And we cannot get costlessly the hat values of the full model from the reduced form. It would require to reestimate the model with the fixed-effects as regular variables.

Value

Returns a vector of the same length as the number of observations used in the estimation.

Examples

est = feols(Petal.Length ~ Petal.Width + Sepal.Width, iris)
head(hatvalues(est))

fixest

Fast Fixed-Effects Estimations

v0.10.0
GPL-3
Authors
Laurent Berge [aut, cre], Sebastian Krantz [ctb], Grant McDermott [ctb] (<https://orcid.org/0000-0001-7883-8573>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.