Bookmark and Share

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: question: an example of xtmixed: testing differences between groups at specific times


From   "Sun, Wensheng" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: question: an example of xtmixed: testing differences between groups at specific times
Date   Wed, 9 Jan 2013 20:41:34 -0600

Hi, Joerg,

I got it. Thanks.

Carol

________________________________________
From: [email protected] [[email protected]] On Behalf Of Joerg Luedicke [[email protected]]
Sent: Wednesday, January 09, 2013 8:20 AM
To: [email protected]
Subject: Re: st: question: an example of xtmixed: testing differences between groups at specific times

If by "compare" you mean hypothesis testing, try

margins girl, at(age=(0.5 1 1.5 2)) coefl post

Then, for example, testing the difference between boys and girls at
baseline would be:

test _b[1bn._at#0bn.girl] = _b[1bn._at#1.girl]

To test the difference between age 0.5 and age 1 for boys would be:

test _b[1bn._at#0bn.girl] = _b[2._at#0bn.girl]

If you were interested in estimating the difference including a
confidence interval between age 0.5 and age 1 for boys, you could
type:

lincom _b[2._at#0bn.girl] - _b[1bn._at#0bn.girl]


Joerg


On Tue, Jan 8, 2013 at 8:49 PM, Sun, Wensheng <[email protected]> wrote:
> Hi,
>
> I am using –xtmixed- on a longitudinal study with planned measurements at 0, 6, 12 and 24 months, but very few follow-up measurements at the planned time. I have fitted the model and need to evaluate changes from baseline and also differences between two treatment groups at exactly 6, 12 and 24 months. The –xtmixed- followed by –margins- gives margins and standard error at each time. How do I compare them? I am using Stata 12 for Windows.
>
> An example of that in public shared data should be
>
> . webuse childweight
> . xtmixed weight c.age##i.girl || id: age, cov(uns) res(ind) mle variance
> . margin girl, at(age=(0.5 1 1.5 2))
>
> What STATA commands should I use if I want to compare the weight between boys and girls at age of 0.5, 1, 1.5, and 2? and How should I compare changes from .5-year to 1 or 1.5 or 2 in girls and boys?
>
> Thank you very much!
>
>
> Carol
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/

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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index