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: Correlation between 2 variables overtime- accounting for repeated measures


From   Robson Glasscock <[email protected]>
To   [email protected]
Subject   Re: st: Correlation between 2 variables overtime- accounting for repeated measures
Date   Sun, 17 Mar 2013 11:22:32 -0400

I am going to refer to a as y and b as x in this post.

If I’m understanding you correctly, you want to estimate the
relationship between y and x. You are not really interested in the
relationship between y and the surgery, and you don’t think that the
effect of x on y changed based on the surgery or over time.  I also
know you said originally that you wanted the correlation, but I’m
going to approach this using regression and a panel data setup. It
also sounds like the jury is still out on whether the fixed effects
transformation is appropriate for your research question.

I think the following model with standard errors adjusted for
correlation in the error term by individual (subject to the discussion
below) is similar to what you are trying to estimate. Surg is a dummy
variable equal to 1 in year 2 and year 3, else 0. Year_2 is a dummy
variable equal to 1 in year 2, else 0. Year 3 is a dummy variable
equal to 1 in year 3, else 0.

y= B0 + B1(x) + B2(surg) + B3(year_2) + B4(year_3) + e

This model estimates marginal effect of x on y and controls for the
influences of both surgery and time. However, this model cannot be
estimated because surg is a linear function of year_2 and year_3 (i.e.
surg= year_2 + year_3).

I think this leaves you with two options. The first is to treat the
two post-surgery years as one period:

y= Bo + B1(x) +B2(surg) + e

I am less confident with the second option, but I think depending on
your assumptions about how the distribution of y changes over time,
that you can include a trend term in the model. The trend variable
equals 1 in year 1, 2 in year 2, 3 in year 3.

y= B0 + B1(x) + B2(surg) + B3(trend) + e

I would like to hear from others if my reasoning is flawed on
including the trend in the model.

Lastly, depending on your assumptions about fixed effects, you could
estimate the above models with

-reg, cluster(individual)-

or

-xtreg, fe-

best,
Robson Glasscock


On Sat, Mar 16, 2013 at 7:46 PM, JVerkuilen (Gmail)
<[email protected]> wrote:
> On Sat, Mar 16, 2013 at 6:49 PM, megan rossi <[email protected]> wrote:
>> Yes The surgery was 1-3weeks after the baselines were taken...a fairly strict protocol. Then one year follow up and two year follow up...variable a &b were both low at baseline (still detectable and possibly correlated) but rise following surgery so are high at year 1 and year 2...perhaps best to just combine year 1 and 2 as if they're both high a correlation would be easier to find then if they're both low?
>>
>
> I don't think I'd combine them. You have different measures and that
> should be respected.
>
> To me the fact that this is longitudinal means that there's a clear
> logical priority. I'd consider the first measurement as "causal" of
> the second one, at least in some respect. So I'm not sure a pure
> correlation makes sense. But I'd like to hear what others might say.
>
> *
> *   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