Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

to predict values in lme4

$
0
0

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!


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>