Guest User

Untitled

a guest
Sep 30th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. library(readxl)
  2. require(lme4)
  3.  
  4. df=read_excel("Book1.xlsx", sheet = 1)
  5. model <- glmer(EVENT ~ TIME + (1+TIME|ID)+x1+x2+x3+x4+x5, data=df, family=binomial)
  6. p <- as.numeric(predict(model, type="response")>0.5)
  7. acc=mean(p==df$EVENT)
Add Comment
Please, Sign In to add comment