From: Berwin A Turlach <berwin_at_maths.uwa.edu.au>

Date: Wed 19 Jul 2006 - 22:43:41 EST

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed Jul 19 22:58:55 2006

Date: Wed 19 Jul 2006 - 22:43:41 EST

G'day John,

>>>>> "JF" == John Fox <jfox@mcmaster.ca> writes:

JF> Simply stacking the problems and treating the resulting JF> observations as independent will give you the correct JF> coefficients, but incorrect coefficient variancesYes, after Andrew's (off-list) answer I realised this too. If I am not mistaken, all variances/covariances should be off by a factor of 1/2 or something like that.

JF> and artificially zero covariances. Well, I must admit that I misread Ulrich's code for most of the day. I hadn't realised that the variable `tmp' introduces a correlation between `y1' and `y2' in his code:

> DF<-data.frame(x1=rep(c(0,1),each=50),x2=rep(c(0,1),50))

*> tmp<-rnorm(100)
**> DF$y1<-tmp+DF$x1*.5+DF$x2*.3+rnorm(100,0,.5)
**> DF$y2<-tmp+DF$x1*.5+DF$x2*.7+rnorm(100,0,.5)
*

for some reason, my brain kept parsing this as generate *one* random intercept for y1 and *one* random intercept for y2, not that each individual observation has a random intercept. Under the model that my brain kept parsing, one would have zero covariances. :)

Now I understand why Andrew suggested the use of mixed models and would go down that way too. But I believe your approach is valid too.

JF> (BTW, it's a bit unclear to me how much of this exchange was
JF> on r-help,

Easy, all those that have r-help either in the TO: or CC: field.
Those were Ulrich's original message and the answer by you and Andrew,
I kept all my mails so far off-list.

JF> but I'm copying to r-help since at least one of Ulrich's JF> messages referring to alternative approaches appeared there. Yes, I noticed that and answered off-list. In that message, if I read it correctly, he had confused Andrew and me.

JF> I hope that's OK.)

Sure, why not? :)

Cheers,

Berwin

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed Jul 19 22:58:55 2006

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.1.8, at Thu 20 Jul 2006 - 00:17:57 EST.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*