Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Convert SAS code to STATA
From
"JVerkuilen (Gmail)" <[email protected]>
To
[email protected]
Subject
Re: st: Convert SAS code to STATA
Date
Sat, 22 Sep 2012 12:11:52 -0400
On Sat, Sep 22, 2012 at 11:59 AM, Marquis Hawkins
<[email protected]> wrote:
> Hi,
>
> Does anyone know how to convert this SAS code to STATA?
>
>
> PROC mixed data= habc.habclong covtest;
> class habcid ckd1 time;
> model gfr = ckd1*time/solution ;
> repeated time/type=un subject=habcid;
> estimate 'avg change/year between baseline and year 3 for grp 1' ckd1*time -0.333 0.333 0 0 0 0 ;
> estimate 'avg change/year between year 3 and year 10 for grp 1' ckd1*time 0 -0.143 0.143 0 0 0 ;
> estimate 'avg change/year between baseline and year 3 for grp 2' ckd1*time 0 0 0 -0.333 0.333 0 ;
> estimate 'avg change/year between year 3 and year 10 for grp 2' ckd1*time 0 0 0 0 -0.143 0.143 ;
> where inclusion=1;
> run;
PROC MIXED would go over to -xtmixed-.
The "estimate" commands would be post-estimation calls to -margins-.
The "class" statement would be done using Stata factor commands (i.,
etc.) or -xi-.
"Repeated" specifies the random structure. That's the part you'll have
to do a little work to map to the right specification but it looks
like you wanted an unstructured covariance matrix and that should be
pretty straightforward to do.
--
JVVerkuilen, PhD
[email protected]
"Out beyond ideas of wrong-doing and right-doing there is a field.
I'll meet you there. When the soul lies down in that grass the world
is too full to talk about." ---Rumi
*
* 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/