I'm trying to fit a mixed linear model as below.
modelF <- lmer(Gini ~ Years +(Years|Country),data1,
REML=TRUE,na.action=na.omit,control = lmerControl(optimizer = "optimx",
calc.derivs = FALSE,optCtrl = list(method = "nlminb", starttests = FALSE, kkt = FALSE)))
The output is : for each Country an intercept and coefficient (so if I have 100 countries, I get a model of B0 and B1 for each country).
they can be displayed using coef(modelF)
however, I wish to display the R-squared for each country.
How can I do that?