# NOT RUN {
# Load trade data
data(trade)
# We estimate the effect of distance on trade (with 3 fixed-effects)
est_pois = femlm(Euros ~ log(dist_km)|Origin+Destination+Product, trade)
# Squared correlation:
r2(est_pois, "sq.cor")
# "regular" r2:
r2(est_pois, "r2")
# pseudo r2
r2(est_pois, "pr2")
# within adjusted r2
r2(est_pois, "war2")
# all four at once
r2(est_pois, c("sq.cor", "r2", "pr2", "war2"))
# }
Run the code above in your browser using DataLab