Re: [R] Efficiency of random and fixed effects estimator

2011-08-23 Thread Ben Bolker
Daniel Malter umd.edu> writes: > > id<-rep(c(1:100),each=2) > obs<-rep(c(0:1),100) > d<-rep(sample(c(-1,1),100,replace=T),each=2) > base.happy<-rep(rnorm(100),each=2) > happy<-base.happy+1.5*d*obs+rnorm(200) > > data<-data.frame(id,obs,d,happy) > > > I am statistically confused tonight. When

Re: [R] Efficiency of random and fixed effects estimator

2011-08-22 Thread Bert Gunter
Daniel: Your question should be addressed to R-sig-mixed-models, as it really does not belong on r-help. -- Bert On Mon, Aug 22, 2011 at 5:11 PM, Daniel Malter wrote: > Small bugs in my simulated data (corrected code below). However, that does > not affect my question: > > id<-rep(c(1:100),eac

Re: [R] Efficiency of random and fixed effects estimator

2011-08-22 Thread Daniel Malter
Small bugs in my simulated data (corrected code below). However, that does not affect my question: id<-rep(c(1:100),each=2) obs<-rep(c(0:1),100) d<-rep(sample(c(-1,1),100,replace=T),each=2) base.happy<-rep(rnorm(100),each=2) happy<-base.happy+1.5*d*obs+rnorm(200) data<-data.frame(id,obs,d,happy)

[R] Efficiency of random and fixed effects estimator

2011-08-22 Thread Daniel Malter
Hi all, I am statistically confused tonight. When the assumptions to a random effects estimator are warranted, random effects should be the more efficient estimator than the fixed effects estimator because it uses fewer degrees of freedom (estimating just the variance parameter of the normal rathe