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: xtreg or xtmixed?


From   Johan van der Watt <[email protected]>
To   [email protected]
Subject   Re: st: xtreg or xtmixed?
Date   Mon, 19 Dec 2011 13:39:27 +0200

Hi there, thank you for the advice. A few more questions now sorry.
The question that I would like to answer, is whether the course of CD4
count over time is different in the group of patients who have
neuropathy vs the group who do not have neuropathy. Firstly, my
dependent variable is binary, either yes or no for development. When I
did the -xtreg- I decided to put neuropathy as my independent variable
because I wanted to see how the continuous variable,
-xtreg cd4_ neuropathy visit, i(patientno2) mle-
eg CD4 count is different between the group of individuals who
developed neuropathy vs the group who remained neuropathy free, as
well as whether CD4 count is different over time. I looked at examples
where they describe 2 groups and see how a continuous factor differs
between the 2 groups. So maybe i didn't understand it correctly? When
I do it like this:
-xtreg neuropathy cd4_ visit, i(patientno2) mle-, I get completely
different results.
Secondly, I am struggling with the fact that some of the continuous
variables are non-linear when I plot them over time, in other words,
as an example, I find inflammatory markers going up from baseline
between the 2nd and 3 visit, and then going back to baseline level at
the last visit. This pattern is the same in both groups (neuropathy
and neuropathy free), however I suspect the magnitude might be
different. Thank you for the slides, I am just not sure how to deal
with this in longitudinal data.
Regards
Johan

On Mon, Dec 19, 2011 at 12:02 PM, Maarten Buis <[email protected]> wrote:
> -xtreg- and -xtmixed- with one level of nesting should give you
> (almost) exactly the same results. -xtreg- is however optimized code
> for the problem with one level of nesting, so you should use that.
>
> However, I can see a major problem in your analysis: You state that
> your dependent variable is neuropathy, while in your analysis it is
> your independent variable. In terms of Stata that means that you
> should put neuropathy first.
>
> Whether your explanatory variables are normally distributed is
> irrelevant. The possible non-linearity of their effect is a real issue
> that you need to address. Whether your dependent variable looks like a
> normal bell shaped curve is actually also deceiving. I gave a talk on
> that at the last Nordic Stata Users' Group meeting:
> <http://www.maartenbuis.nl/presentations/stockholm11.pdf>.
>
> Hope this helps,
> Maarten
>
> On Mon, Dec 19, 2011 at 10:44 AM, Johan van der Watt wrote:
>> Hi
>> I need to do longitudinal statistics on a panel data set of 150
>> individuals over 4 different time points. My dependent variable is the
>> development of neuropathy (everyone is neuropathy free at baseline
>> assessment), and a have numerous continuous independent
>> variables/possible risk factors for development of neuropathy, such as
>> CD4 count. A few of the continuous variables are not normally
>> distributed, and I am able to normalize most of them by either logging
>> or square rooting them. Further, looking at these variables over time,
>> some of them also do not follow a linear pattern, i.e they peak at
>> visit 2 or 3 then go down at visit 4.
>> I have used the -xtreg- command with -mle-, using a continuous
>> variable, such as CD4 count, Neuropathy, and Visit:
>>
>> xtreg cd4_  neuropathy visit, i(patientno2) mle
>>
>> but after reading online articles and bulletin boards,  I have also
>> tried the mixed effects model:
>>
>> xtmixed cd4_  neuropathy visit ||  patientno2:,mle
>>
>> As I am a stats amateur, is this what I am doing correct? Any other options?
>>
>> Thanks
>>
>> *
>> *   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/
>
>
>
> --
> --------------------------
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
>
>
> http://www.maartenbuis.nl
> --------------------------
>
> *
> *   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/

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index