Advertisement
Guest User

Untitled

a guest
Jul 10th, 2014
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. Warning messages:
  2. 1: In vcov.merMod(object, use.hessian = use.hessian) :
  3. variance-covariance matrix computed from finite-difference Hessian is
  4. not positive definite: falling back to var-cov estimated from RX
  5. 2: In vcov.merMod(object, correlation = correlation, sigm = sig) :
  6. variance-covariance matrix computed from finite-difference Hessian is
  7. not positive definite: falling back to var-cov estimated from RX
  8.  
  9. ### [1] "standardGeneric"
  10. ###attr(,"package")
  11. ###[1] "methods"
  12.  
  13. ### [1] "lmerMod"
  14. ### attr(,"package")
  15. ### [1] "lme4"
  16.  
  17. diagn00<- rep(0,240)
  18.  
  19. drug00<- rep(0,240)
  20.  
  21. time00<- c(rep(0,80),rep(1,80),rep(2,80))
  22.  
  23. response00<- c(rep(0,39),rep(1,41),rep(0,33),rep(1,47),rep(0,26),rep(1,54))
  24.  
  25. patients00<- rep(1:80,3)
  26.  
  27. test<- data.frame(patients00,diagn00,drug00,time00,response00)
  28.  
  29. diagn01<- rep(0,210)
  30.  
  31. drug01<- rep(1,210)
  32.  
  33. time01<- c(rep(0,70),rep(1,70),rep(2,70))
  34.  
  35. response01<- c(rep(0,33),rep(1,37),rep(0,15),rep(1,55),rep(0,2),rep(1,68))
  36.  
  37. patients01<- rep(81:150,3)
  38.  
  39. diagn10<- rep(1,300)
  40.  
  41. drug10<- rep(0,300)
  42.  
  43. time10<- c(rep(0,100),rep(1,100),rep(2,100))
  44.  
  45. response10<- c(rep(0,79),rep(1,21),rep(0,72),rep(1,28),rep(0,54),rep(1,46))
  46.  
  47. patients10<- rep(151:250,3)
  48.  
  49. diagn11<- rep(1,270)
  50.  
  51. drug11<- rep(1,270)
  52.  
  53. time11<- c(rep(0,90),rep(1,90),rep(2,90))
  54.  
  55. response11<- c(rep(0,74),rep(1,16),rep(0,45),rep(1,45),rep(0,15),rep(1,75))
  56.  
  57. patients11<- rep(251:340,3)
  58.  
  59. diagnosis<- c(diagn00,diagn01,diagn10,diagn11)
  60. diagnosis<- as.factor(diagnosis)
  61.  
  62. id<- c(patients00,patients01,patients10,patients11)
  63. id<- as.factor(id)
  64.  
  65. drug<- c(drug00,drug01,drug10,drug11)
  66. drug<- as.factor(drug)
  67. time<- c(time00,time01,time10,time11)
  68.  
  69. response<- c(response00,response01,response10,response11)
  70.  
  71. id<- c(patients00,patients01,patients10,patients11)
  72.  
  73. data<- data.frame(id, response, diagnosis, drug, time)
  74. e<- order(data$id)
  75. d<- data[e,]
  76.  
  77. library(lme4)
  78.  
  79. d2<- data.frame(d)
  80. d2$response<- as.factor(d2$response)
  81.  
  82. t<- glmer(response ~ diagnosis + drug + time + time:drug +
  83. (1 | id), family=binomial, data=d2, control=list(maxIter=500),Hessian=FALSE))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement