When estimating a Fixed Effects model on panel data and an equivalent dummy variables regression, the coefficient estimates and associated SEs are identical. However, the R-squared and F-statistic are noticeably different (e.g. R-sq from dummy regression is usually much higher than R-sq from FE specification).
Once we obtain the R-squared & F-stat from the dummy variables regression, how can one adjust them to retrieve the same results as from the FE specification?
Consider this example:
library(foreign);library(plm);library(stargazer)
wagepan<-read.dta("http://fmwww.bc.edu/ec-p/data/wooldridge/wagepan.dta")
# Generate pdata.frame:
wagepan.p <- pdata.frame(wagepan, index=c("nr","year") )
# Estimate FE parameter in 3 different ways:
wagepan.p$yr<-factor(wagepan.p$year)
# Estimate dummy vars and FE models
reg.fe <-(plm(lwage~married+union+yr*educ,data=wagepan.p, model="within"))
reg.dum<-( lm(lwage~married+union+yr*educ+factor(nr), data=wagepan.p))
stargazer(reg.fe,reg.dum,type="text",model.names=FALSE,
keep=c("married","union"),omit.stat=c("ser"),
column.labels=c("Within","Dummies"))
Which will yield:
=================================================================
Dependent variable:
----------------------------------------------------
lwage
Within Dummies
(1) (2)
-----------------------------------------------------------------
married 0.055*** 0.055***
(0.018) (0.018)
union 0.083*** 0.083***
(0.019) (0.019)
-----------------------------------------------------------------
Observations 4,360 4,360
R2 0.171 0.616
Adjusted R2 0.049 0.560
F Statistic 48.907*** (df = 16; 3799) 10.900*** (df = 560; 3799)
=================================================================
Note: *p<0.1; **p<0.05; ***p<0.01
How can I adjust the Model 2
R2 and F-stat (0.616
and 10.9
, respectively) to retrieve the same figures as in Model 1
(0.171
and 48.9
)?