Date: Thu, 25 Jul 2002 10:17:25 -0700
Reply-To: Gabriel Demombynes <demombynes@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gabriel Demombynes <demombynes@YAHOO.COM>
Subject: Re: proc mixed vs. proc reg for ols
In-Reply-To: <Pine.A41.4.44.0207251034160.20784-100000@aix09.unm.edu>
Content-Type: text/plain; charset=us-ascii
Thanks for the suggestion. I think you meant to say
that you should specify the MODEL option ACOV, not
HET, to get the Huber-White var-covar matrix with REG.
This does not, however, give you the Huber-White
result with clustered observations, which is what I'm
trying to do with PROC MIXED.
I tried the suggested code:
proc reg data=valid.fakelsms10;
model lnconpc=hsize hsize2 agehead agehead2 roompp
roompp2;
run;
proc mixed data=valid.fakelsms10 empirical;
class cluster;
model lnconpc=hsize hsize2 agehead agehead2 roompp
roompp2 / solution;
random int /subject=cluster;
run;
Specifying the SOLUTION option does produce the
parameter estimates with PROC MIXED. But the PROG REG
and the PROC MIXED don't produce the same parameter
estimates, or even anything very close, which they
should if PROC MIXED is giving me the Huber-White
corrected standard errors for OLS. I understand that
PROC MIXED is using ML to estimate the model, but this
should produce the same results as OLS. What am I
doing wrong?
Thanks,
Gabriel
--- "Raymond V. Liedka" <liedka@unm.edu> wrote:
> On Wed, 24 Jul 2002, Gabriel wrote:
>
> > Here's my basic OLS regression:
> >
> > proc reg data=valid.fakelsms10;
> > model lnconpc=hsize hsize2 agehead agehead2 roompp
> roompp2;
> > run;
>
> Just for completeness's sake, with REG one can get
> Huber-White SEs with
> the HET option on the model statement.
>
> >
> > How can I do the equivalent with proc mixed and
> get 1) parameter
> > estimates and 2) the huber-white
> variance-convariance matrix allowing
> > for clustering using the variable "cluster". I've
> tried the following:
> >
> > proc mixed data=valid.fakelsms10 empirical;
> > model lnconpc=hsize hsize2 agehead agehead2 roompp
> roompp2;
> > random int /subject=cluster;
> > run;
> >
> > But I'm not sure if this is correct. And I don't
> see the parameter
> > estimates in the basic PROC MIXED output. The
> parameter estimates
> > should be the same as what I get with OLS model,
> since I just want
> > PROC MIXED to use ML to estimate the same linear
> model, but with the
> > Huber-White var-covar matrix.
>
> The trick is that MIXED syntax is closer to PROC GLM
> than PROC REG. I.E.,
> parameter estimates are NOT automatically reported.
>
> Try this:
>
> proc mixed data=valid.fakelsms10 empirical;
> class cluster;
> model lnconpc=hsize hsize2 agehead agehead2 roompp
> roompp2 / solution;
> random int /subject=cluster;
> run;
>
> And you will get what you'd like. It is generally
> that case that the id
> variable is specified as a CLASS categorical
> variable. But it is not
> required, as long as the data set is properly sorted
> by the ID variable
> prior to the MIXED procedure (or weirdness may
> result).
>
> ray
>
>
> Raymond V. Liedka
> Assistant Professor
> Department of Sociology
> University of New Mexico
>
>
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
|