Fixed effects regression | R Documentation |
Fixed effects regression.
fe.lmfit(y, x, id)
y |
A numerical vector or a numerical matrix. |
x |
A numerical matrix with the predictor variables. |
id |
A vector with the subject ids. This can be factor or a numerical. |
The function performs fixed effects regression (within estimator) for panel (longitudinal) data. It can also handle unblanced designs. A main difference from the package "plm" is that it returns much fewer information, but much faster.
A list including:
be |
The beta coefficients. |
fe |
The fixed effect deviations. |
residuals |
The residuals of the linear model(s). |
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
https://www.econometrics-with-r.org/10-rwpd.html
cluster.lm, gee.reg, fipois.reg, wild.boot
y <- rnorm(100)
x <- rnorm(100)
id <- rep(1:10, 10)
mod <- fe.lmfit(y, x, id)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.