I am running a FE regression of firm characteristics on the dependant variable effective tax rates. I tried both plm package and fixest package. I understand the differences in the standard errors (and I correct them with coeftest for the plm regression, not shown here), however I do not understand the difference in adjusted R-squared between fixest and plm. Coefficients are the same in both models, so adjusted R-squared should be the same, right?
> fe <- feols(GETR ~ SIZE + LEV + CAPINT + INVINT + ROA + LLEV + CF + EK| id + year,data = panel52,cluster = ~ id+year)
> summary(fe)
OLS estimation, Dep. Var.: GETR
Observations: 19,240
Fixed-effects: id: 1,924, year: 10
Standard-errors: Clustered (id & year)
Estimate Std. Error t value Pr(>|t|)
SIZE 0.031979 0.010624 3.010150 0.0147123 *
LEV -0.021880 0.033039 -0.662243 0.5244090
CAPINT 0.098979 0.027374 3.615754 0.0056088 **
INVINT 0.045080 0.039294 1.147250 0.2808605
ROA 0.222094 0.089892 2.470664 0.0355315 *
LLEV 0.015973 0.025740 0.620558 0.5502796
CF -0.237174 0.098485 -2.408230 0.0393631 *
EK 0.027064 0.063651 0.425196 0.6806793
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
RMSE: 0.160357 Adj. R2: 0.212174
Within R2: 0.004764
> summary(fe52)
Twoways effects Within Model
Call:
plm(formula = GETR ~ SIZE + LEV + CAPINT + INVINT + ROA + LLEV +
CF + EK, data = panel52, na.action = na.exclude, effect = "twoways",
model = "within")
Balanced Panel: n = 1924, T = 10, N = 19240
Residuals:
Min. 1st Qu. Median 3rd Qu. Max.
-0.7032714 -0.0635238 -0.0079128 0.0376269 0.9293129
Coefficients:
Estimate Std. Error t-value Pr(>|t|)
SIZE 0.0319790 0.0065342 4.8941 9.967e-07 ***
LEV -0.0218800 0.0356996 -0.6129 0.5400
CAPINT 0.0989786 0.0222388 4.4507 8.612e-06 ***
INVINT 0.0450804 0.0366761 1.2292 0.2190
ROA 0.2220941 0.0389295 5.7050 1.182e-08 ***
LLEV 0.0159730 0.0180534 0.8848 0.3763
CF -0.2371736 0.0425711 -5.5712 2.567e-08 ***
EK 0.0270641 0.0380943 0.7104 0.4774
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Total Sum of Squares: 497.11
Residual Sum of Squares: 494.74
R-Squared: 0.004764
Adj. R-Squared: -0.10685
F-statistic: 10.3509 on 8 and 17299 DF, p-value: 1.4467e-14```