What does it mean for Multiple "R-squared(proj model)" in felm, package lfe In the output of felm function which is a function for the Linear Models with Multiple Fixed Effects, two R-squared information are provided: Multiple R-squared(full model) and Multiple R-squared(proj model).
How to interpret the Multiple R-squared(proj model)? I guess the R-squared(full model) refer to the effect of all the variables (x1, f1, f2 and f3) in the model, in which f1, f2 and f3 serves like categorical variables in regression. And Multiple R-squared(proj model) refers to the effect of purely f1, f2 and f3 when x1 is not included in the model. Am I right? I need to understand this in order to calculate the effect size of the independent variable (x1 in this case). Thanks!
   summary(est <- felm(y ~ x1 | f1 + f2 + f3))

Call:
   felm(formula = y ~ x1 | f1 + f2 + f3) 

Residuals:
     Min       1Q   Median       3Q      Max 
-2.35266 -0.57436 -0.00792  0.61786  2.13316 

Coefficients:
   Estimate Std. Error t value Pr(>|t|)    
x1   2.4043     0.1217   19.75   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

    Residual standard error: 0.9832 on 76 degrees of freedom
    Multiple R-squared(full model): 0.9058   Adjusted R-squared: 0.8773 
    Multiple R-squared(proj model): 0.8369   Adjusted R-squared: 0.7876 
    F-statistic(full model):31.79 on 23 and 76 DF, p-value: < 2.2e-16 
    F-statistic(proj model): 390.1 on 1 and 76 DF, p-value: < 2.2e-16 
    *** Standard errors may be too high due to more than 2 groups and exactDOF=FALSE

 A: The F-statistic(proj model) is the joint test of the coefficients that have not been projected out.  In your case it is the same as waldtest(est, ~x1). Since it's a single variable, the p-value is the same as the one from the t-test.
A: Directly from: http://karthur.org/2016/fixed-effects-panel-models-in-r.html

summary(felm.model) "...we are given two pairs of goodness-of-fit statistics: the multiple and adjusted R-squared for the "full" and "projected" models. The full model is our model with the individual fixed effects included; the projected model is the estimated model where our fixed effects are not included. The full model always performs better than the projected model because the individual fixed effects always explain additional variation in the response: they account for any idiosyncratic differences between each observational unit.

A: I have been looking for the three types of R-squared of the Fixed Effects model outputs in R as well.
I was able to manually calculate and reproduce lfe's full and proj R-squared using the model fit from the standard lm package. That said, I am quite certain that the full R-sq is straightforward, meaning R-sq of all pairs of predicted values and original values. At the same time, their proj R-squared is also identical to the so-called within R-squared (definitions from STATA), which is the default reported R-squared in the plm package.
After reading STATA manual Page 10 briefly, I think the full R-sq in lfe and overall R-sq in STATA are the same idea. I see some people said overall R-sq is a weighted average of within and between R-sq, but I did not see any supporting evidence for this statement. I only see that both overall and full R-sq are directly calculated from the pairs of predicted y and original y.
Below are my own calculations for full and proj R-sq.
fe_lm_mod <- lm(formula = "y ~ x1 + x2 + entity - 1", data = dataframe)
## Calculate prediction
y_predict <- predict(fe_lm_mod, newdata = dataframe)
y_original <- dataframe$y

# Get the valid values indices
notmiss <- which((!is.na(y_predict)) & (!is.na(y_original))) 

# Residiual sum of squares
SSres <- sum((y_original[notmiss] - y_predict[notmiss])**2)

# Calculate full R2
SStot_full <- sum((y_original[notmiss] - mean(y_original[notmiss]))**2)

### get the demean. The within finds the total sum of squares on the demeaned outcome variable. 
### References
# https://stats.stackexchange.com/questions/262246/difference-of-r2-between-ols-with-individual-dummies-to-panel-fixed-effect-mo
demeaned_y <- y_original[notmiss] - tapply(y_original[notmiss],dataframe$entity[notmiss],mean)[dataframe$entity][notmiss]
# Calculate within R2
SStot_within <- sum((demeaned_y-mean(demeaned_y))^2)

print(paste("calculated full R2", 1 - SSres/SStot_full))
print(paste("calculated within R2", 1 - SSres/SStot_within))

For between R-sq, I think the plm package with model="between" may produce between R-sq, but I am not very sure. One can try to calculate it based on the STATA manual, like what I did for full and within R-sq.
Finally I made a summary for the R-sq outputs:

*

*lm R-sq: not good for Fixed Effects model, cannot reproduce

*lfe "full" R-sq: R-sq for all pairs predicted y and original y, may also be called as "overall" R-sq

*lfe "proj" R-sq: "within" R-sq: how much of the variation in the dependent variable within each entity group is captured by the model

*plm model="within" R-sq: same as 3.

*plm model="between" R-sq: "between" R-sq: how much of the variation in the dependent variable between each entity group is captured by the model

*plm model="pooling" R-sq: not good for Fixed Effects model. This is the standard OLS R-sq. It is not a Fixed Effects model R-sq.

