Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: xtmixed SAS to Stata


From   "Joseph Coveney" <[email protected]>
To   <[email protected]>
Subject   st: Re: xtmixed SAS to Stata
Date   Thu, 27 Aug 2009 01:36:49 +0900

Ricardo Ovaldia wrote:

I was give the following SAS code and want to replicate in Stata. I am not sure
how to do this.

SAS code:
      proc mixed data=nutrit.main covtest; 
      class  ParticipantID Gender feedgroup;
      model WeightAvgKg=Gender|feedgroup|Time GestAgeWks DietHxScore/solution ;
      repeated / type=un subject=ParticipantID;
      ods output Tests3=WeightAvgKg ;
      run;

--------------------------------------------------------------------------------

Wouldn't it be something similar to the following?

xtmixed WeightAvgKg i.gender##i.feedgroup##c.Time c.GestAgeWks ///
    c.DietHxScore || ParticipantID: , residuals(unstructured) t(Time) ///
    variance nolrtest

For the Tests3 ODS option, you'll want to construct the contrasts yourself for
the so-called Type 3 tests of fixed effects.  You can see how they're done at
www.stata.com/statalist/archive/2009-01/msg00172.html .

I think that COVTEST also prints out Wald tests for the variance components in
addition to Wald-based confidence intervals.  I'm advised that these are best
considered as entertainment.

Joseph Coveney


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index