heyy i have a problem with getting the the below error. I am new to R and not sure how to resolve this!!
I am trying to find the mean of residuals in a multi-linear regression model (testing for the assumptions)
My code is
mean(model1$residuals)
where model1 is
model1 = lmer(corruption ~ Gini.Index + GDP + Democracy.Index + Political.Terror.Index + Economic.Freedom + Regime + respondentage +
respondentgender + Education_Completed + Employment + European.Integration + (1 | country), NewD, REML = FALSE)
When i run the code for mean i get error--- error in evaluating the argument 'x' in selecting a method for function 'mean': $ operator not defined for this S4 class
Does anyone know what to do???