[R-sig-ME] lmer and SAS proc mixed

Emmanuel Charpentier charpent at bacbuc.dyndns.org
Tue May 26 22:51:03 CEST 2009

Le mardi 26 mai 2009 à 21:10 +0200, Viechtbauer Wolfgang (STAT) a
écrit :
> Try:
> proc mixed data=dt;
> 	class pid;
> 	model y= &fvars / solution outp=predicted;
> 	random intercept x1/sub=pid type=un solution;
> 	ods output SolutionF=fbeta;
> 	ods output SolutionR=rbeta;
> (note the addition of type=un on the line starting with random). I
> believe type=vc is the default, which does not allow the random
> intercept and slope to be correlated (which lmer does).

Can the parametrzation also play a role ?

In this case, I don't think : pid is the only "class" variable declared
in this proc step, which implies (or implied, in the times I was a SAS
user) that X1-...-X5 are continuous variables. Unless SAS started to
support a permanent class attribute in his datasets since v6.x (the last
I used with any kind of regularity)...

But I remember having been bitten by this  when first trying to learn R
and hitting differences in regression/ANOVA coefficients. And, yes, the
dreaded "Type III SS" problem, which Bill Venables' "Exegeses on the
linear model" considerably enlightened.

					Emmanuel Charpentier

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