Re: [R] extracting nested variances from lme4 model

2006-10-16 Thread Spencer Graves
Dear Doug & Frank: Thanks for the reply, Doug. First a comment, then another question for you, Doug, if you have time: 1. COMMENT: Here's an ugly hack that would seem to answer Frank's question using 'lmer': (vt <- with(dtf, tapply(x, trth, sd))) (vr <- vt[2]/vt[1]) mod1b <

Re: [R] extracting nested variances from lme4 model

2006-10-15 Thread Douglas Bates
On 10/15/06, Douglas Bates <[EMAIL PROTECTED]> wrote: > On 10/14/06, Spencer Graves <[EMAIL PROTECTED]> wrote: > > You want to estimate a different 'cs' variance for each level of > > 'trth', as indicated by the following summary from your 'fake data set': > > > > > tapply(dtf$x, dtf$trth, s

Re: [R] extracting nested variances from lme4 model

2006-10-15 Thread Douglas Bates
On 10/14/06, Spencer Graves <[EMAIL PROTECTED]> wrote: > You want to estimate a different 'cs' variance for each level of > 'trth', as indicated by the following summary from your 'fake data set': > > > tapply(dtf$x, dtf$trth, sd) >FALSE TRUE > 1.532251 8.378206 > > Since var(x

Re: [R] extracting nested variances from lme4 model

2006-10-14 Thread Spencer Graves
You want to estimate a different 'cs' variance for each level of 'trth', as indicated by the following summary from your 'fake data set': > tapply(dtf$x, dtf$trth, sd) FALSE TRUE 1.532251 8.378206 Since var(x[trth]) > var(x[!trth]), I thought that the following should prod

[R] extracting nested variances from lme4 model

2006-10-04 Thread Frank Samuelson
I have a model: mod1<-lmer( x ~ (1|rtr)+ trth/(1|cs) , data=dtf) # Here, cs and rtr are crossed random effects. cs 1-5 are of type TRUE, cs 6-10 are of type FALSE, so cs is nested in trth, which is fixed. So for cs I should get a fit for 1-5 and 6-10. This appears to be the case from the random