within subjects, 3 conditions, 3 lines
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I think that you have correctly identified the problem. Cheers, Marko
On 01/21/2015 09:16 AM, Stanislav Aggerwal wrote:
I will attempt an answer to my own question. Possibly the reason I got the same answer with the 3 methods is that my simulation was wrong. It simulated the responses as: y<- (cond=="a")*(a1 + a4*x) + (cond=="b")*(a1+a2 + (a4+a5)*x) + (cond=="c")*(a1+a3 + (a4+a6)*x) + rnorm(5*3*nsubj,mean=0,sd=.5) This contains the intercepts and slopes which are unique to each subject and randomly sampled from some population values. However the term: rnorm(5*3*nsubj,mean=0,sd=.5) is wrong because it says the errors are independent. Instead they should be correlated within each subject. I will give that a go. Stan [[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUv2OgAAoJEJcj4KySkkQsUbgP/jhOyGuwPpAyS8I6uFElxztg sQdiGeUaVKjutcJJsHisezEcRxcf84k09hWnR1bnc/fuFQgDqS58qnoUa2JJqiZh BrnCjIV7Cj///DLC0MLzyzvmZLq21medi6vdUwdAF5gc1GOJHoA9IWgoEACucqEc SbpWiaqUWpNK2rCOZ3crTEBZNHEHO72qKBq670L5zDTfRfx4IXsjGMyY68Lf/Tz/ jECjDGM3byO2pw5KginLWl3hA+0ChcKNNmti3rY8p9JVZ8c4iEDrT0Hjvx/VN8zn JPcRSJFR263haozcENATtAgUmBCT66j+IfB/7aQgAOthTdEWWjtnnnVxTbDvBkik tVB617PXdUL5l7kcmxZYcwiigOQerJrEDcUhoL8SMtL54JluWg9MZIZxXmjGHMlm mtrvbv6rfU3XzB80ck8zm6SSgPwP1IYoqJZ7QWBx0XTuU057tjyG8rA6F/jkYc3t Uoe0NwY1Ox9Q62paJQ4sysyf2dgyW2RYRVVQuK1UjlH9ZfmETtq36J6yyEXjuhir ztVsKeofNgRKo4FrmhcOLcBPofzQBnzTI1RjuqCxcbt9vsr4Wwn1uvup20OqDYb7 VKbzoKr8HR26YDS7Oc3vUiOzjszNEALnKAWFoUfW/BQRQGzIZl0lR1g52SzRphL5 u/shRpd5ZYjTJUgT9IQ+ =/B+Q -----END PGP SIGNATURE-----