Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Warning messages:
- 1: In vcov.merMod(object, use.hessian = use.hessian) :
- variance-covariance matrix computed from finite-difference Hessian is
- not positive definite: falling back to var-cov estimated from RX
- 2: In vcov.merMod(object, correlation = correlation, sigm = sig) :
- variance-covariance matrix computed from finite-difference Hessian is
- not positive definite: falling back to var-cov estimated from RX
- ### [1] "standardGeneric"
- ###attr(,"package")
- ###[1] "methods"
- ### [1] "lmerMod"
- ### attr(,"package")
- ### [1] "lme4"
- diagn00<- rep(0,240)
- drug00<- rep(0,240)
- time00<- c(rep(0,80),rep(1,80),rep(2,80))
- response00<- c(rep(0,39),rep(1,41),rep(0,33),rep(1,47),rep(0,26),rep(1,54))
- patients00<- rep(1:80,3)
- test<- data.frame(patients00,diagn00,drug00,time00,response00)
- diagn01<- rep(0,210)
- drug01<- rep(1,210)
- time01<- c(rep(0,70),rep(1,70),rep(2,70))
- response01<- c(rep(0,33),rep(1,37),rep(0,15),rep(1,55),rep(0,2),rep(1,68))
- patients01<- rep(81:150,3)
- diagn10<- rep(1,300)
- drug10<- rep(0,300)
- time10<- c(rep(0,100),rep(1,100),rep(2,100))
- response10<- c(rep(0,79),rep(1,21),rep(0,72),rep(1,28),rep(0,54),rep(1,46))
- patients10<- rep(151:250,3)
- diagn11<- rep(1,270)
- drug11<- rep(1,270)
- time11<- c(rep(0,90),rep(1,90),rep(2,90))
- response11<- c(rep(0,74),rep(1,16),rep(0,45),rep(1,45),rep(0,15),rep(1,75))
- patients11<- rep(251:340,3)
- diagnosis<- c(diagn00,diagn01,diagn10,diagn11)
- diagnosis<- as.factor(diagnosis)
- id<- c(patients00,patients01,patients10,patients11)
- id<- as.factor(id)
- drug<- c(drug00,drug01,drug10,drug11)
- drug<- as.factor(drug)
- time<- c(time00,time01,time10,time11)
- response<- c(response00,response01,response10,response11)
- id<- c(patients00,patients01,patients10,patients11)
- data<- data.frame(id, response, diagnosis, drug, time)
- e<- order(data$id)
- d<- data[e,]
- library(lme4)
- d2<- data.frame(d)
- d2$response<- as.factor(d2$response)
- t<- glmer(response ~ diagnosis + drug + time + time:drug +
- (1 | id), family=binomial, data=d2, control=list(maxIter=500),Hessian=FALSE))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement