s-news
[Top] [All Lists]

lme/gls/proc mixed

To: "'s-news@wubios.wustl.edu'" <s-news@wubios.wustl.edu>
Subject: lme/gls/proc mixed
From: "Wright, Kevin" <kevin.wright@pioneer.com>
Date: Tue, 25 Jun 2002 19:25:40 -0500
I am helping someone convert code from SAS proc mixed to S-Plus/R.  After an
hour of struggles, I am seeking some help. The proc mixed code is:

proc mixed data = meps;
  class cross;
  model y = cross g1(cross)  g2(cross)  g3(cross)  g4(cross)  g5(cross)
            g6(cross) 
           /solution noint;
run;

I know that the lme function cannot be used in this situation because there
are no random effects.  I tried to use the gls function and fit this model:

gls(y ~ cross -1 + g1%in%cross + g2%in%cross + g3%in%cross
                 + g4%in%cross + g5%in%cross + g6%in%cross, meps)

but encountered errors.  Using the lm function with the same formula did
give results that nearly matched proc mixed output, though the loglikelihood
doesn't appear to be part of the fitted model object from 'lm'. 

Can gls be used to fit the model described?  (Note, even one nested effect
seems to give gls problems.)  I suppose I could calculate the loglikelihood
by hand, but it would be convenient if gls could be made to work here.

Kevin Wright


<Prev in Thread] Current Thread [Next in Thread>
  • lme/gls/proc mixed, Wright, Kevin <=