Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: Convert SAS code to STATA


From   "JVerkuilen (Gmail)" <jvverkuilen@gmail.com>
To   statalist@hsphsun2.harvard.edu
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
<marquishawkins82@hotmail.com> 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
jvverkuilen@gmail.com

"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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index