s-news
[Top] [All Lists]

Linear mixed effects

To: s-news@lists.biostat.wustl.edu
Subject: Linear mixed effects
From: "paul hughes" <u7n96@hotmail.com>
Date: Thu, 14 Dec 2000 22:15:47 -0000



Hi all,
Thanx for your patience with me over the last few weeks. I am finally getting to grips with some of the s commands and thanx to you lot the learning curve is more of a curve than a brick wall. I have another problem.
y2<-function(n,i,s1,s2,s3,s4)
{
a<-c(0,cumsum(rexp(n-1)))
x<-ifelse(c(rep(c(sample(1:i)),n/i)) > i/2, 1, 0)
t<- cumsum(c(s1,s2,s3,s4))
s<-outer(a,t,"+")
y<-2+3*a+4*s+5*x
df <- data.frame(a=a,x=x,s=s,y=y)
fit<-lme(fixed=y~a+x+s,cluster=~x,data=""
return(df,fit)
}

I want s to fit a laird and ware model to the above generated data that i have placed in a dataframe. I get the following error:

Error in lme.formula(fixed = y ~ a + x + s, clus..: Length of variable 1 is 3 != length of row names (20)
 
Does anyone know what its trying to say?


Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com

<Prev in Thread] Current Thread [Next in Thread>
  • Linear mixed effects, paul hughes <=