[R-sig-ME] Fwd: lme() and SAS proc mixed

Ben Bolker bbolker at gmail.com
Tue Oct 9 14:46:37 CEST 2012

  [forwarding to r-sig-mixed-models .  If you forget your password you
  should be able to retrieve it online.  Or read the mailing lists via
  the Gmane or Nabble interfaces, which allow you to post as well as

-------- Original Message --------
Subject: 	lme() and SAS proc mixed
Resent-Date: 	Mon, 08 Oct 2012 12:16:53 -0400
Date: 	Mon, 8 Oct 2012 16:13:40 +0000
From: 	Verchinina, Lilia <lverchin at med.umich.edu>
To: 	bolker at mcmaster.ca <bolker at mcmaster.ca>

> Hello Ben,
> It seems you answered my question about translating proc mixed for 
> linear mixed model into R lme(). Thanks a lot for you answer, it
> helped! I forgot my password with R-help, so I was not able to
> answer through R-help. When I use your code:
> lme(score~var2+score_base+var4+var5+var3+var6+var7+var1+time-1, 
> random=~time|subject, data=...)
> I get estimates for both codes of Gender factor variable, while
> there is not thord reference level so I am not sure what is taken
> as a reference level for Gender.

  I'm not sure which variable corresponds to Gender?
  When you take out the intercept, there is no reference level
(i.e., zero is the reference value).

> I have the same problem with my SAS proc mix code:
> proc mixed data = survey method=reml; class subject var1 var3 var2
> time; model score = var2 score_base var4 var5 var3 var6 var7 var1
> time/ noint solution; random intercept timecontinious /
> subject=subject type=un g gcorr v vcorr;
> run;
> If I remove “-1” in the formula than you kindly provided, I do not
> get estimates for both Gender categories and one of the gender
> levels is used as a reference. I am curious what “-1” in the
> formula of your R code stands for? How can I fix this problem in
> SAS code, so I do not get estimates for both gender levels, but one
> of the two gender levels  is used as a reference?

  -1 is the same as "noint" in SAS-world, I believe. It specifies
that the model doesn't have an intercept.  There is a section in
the Introduction to R on R's modeling syntax.

More information about the R-sig-mixed-models mailing list