Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(readxl)
- require(lme4)
- df=read_excel("Book1.xlsx", sheet = 1)
- model <- glmer(EVENT ~ TIME + (1+TIME|ID)+x1+x2+x3+x4+x5, data=df, family=binomial)
- p <- as.numeric(predict(model, type="response")>0.5)
- acc=mean(p==df$EVENT)
Add Comment
Please, Sign In to add comment