I used library(lme4)
to build my model. The model is
modTTO <- lmer(as.numeric(`TTO value`) ~ mo2+mo3+sc2+sc3+ua2+ua3+pd2+pd3+ad2+ad3 + (1 | internal_id), TTO, REML=FALSE)
Now I want to predict
values for 81 states in a new data frame. I tried
predicted$values<-predict(modTTO, type="response")
I got an error
Error in
$<-.data.frame
(*tmp*
, values, value = c(-0.252543831995977, : replacement has 3000 rows, data has 81
How do I predict values for these particular 81 states.
Thank you!