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]

From |
K Jensen <[email protected]> |

To |
statalist <[email protected]> |

Subject |
Re: st: Longitudinal analysis - help! |

Date |
Thu, 14 Nov 2013 13:48:09 +0000 |

Thanks for your very helpful reply, Nick. The data are human blood measurements. We are monitoring lithium (X), which needs to be maintained at therapeutic levels in the blood for patients with certain diagnoses. Lithium levels could have an effect on renal function (Y). The lithium is monitored regularly, with extra measurements made if a person has high levels, to check that they have gone back to normal after intervention. Renal function is measured at less frequent intervals and not repeated if it is out of range. A blood test is likely to be lithium only, or both lithium and renal function, but not renal function only. We are interested in the effects of lithium "highs". A "high" will last only for a few days, but its effect on the kidneys could last up to a year. Just how high is high enough to cause damage? What about several highs in the same patient? Those are the sorts of questions we are interested in answering. Thankyou again Karin On 13 November 2013 18:14, Nick Cox <[email protected]> wrote: > This to me is a very interesting area, indeed a long-standing, > although slow-moving, personal preoccupation. > > The background here of why you have irregular measurements and > particularly why you sometimes, but not always, have simultaneous > measurements for X and Y, might be relevant for what kind of analysis > makes sense. Your data could be reorganised to allow various -xt- > commands, but it's hard to see that you can use times when only one > variable is measured. > > There is literature on time series analysis for irregularly spaced > data. The Wikipedia article > http://en.wikipedia.org/wiki/Unevenly_spaced_time_series is short, but > in my view spot on. > > For some related discussion see > > http://www.stata.com/statalist/archive/2013-02/msg00484.html > > http://www.stata.com/statalist/archive/2013-02/msg00487.html > > There are several routines for interpolation in Stata, including > -ipolate-, -cipolate- (SSC), -csipolate- (SSC), -pchipolate- (SSC) and > -nnipolate- (SSC). > > For reasons I do not fully understand there is massively more interest > in imputation for time series data (which is always complicated, and > almost always difficult to defend, because most missingness is > strongly non-random) than in interpolation (which is always simple, > and almost always difficult to defend, for different reasons). > > Nick > [email protected] > > > On 13 November 2013 17:00, K Jensen <[email protected]> wrote: > >> I have two time series, of values recorded at irregular intervals. I >> would like to see if one variable (X) predicts the other (Y), >> particularly whether high exposure to X increases the value of Y (the >> effect would be some months afterwards, but the interval over which a >> high has an effect is not known precisely and is likely to differ from >> person to person). X is measured more often than Y. >> >> Both X and Y vary from observation to observation, with some subjects >> having repeated "highs" of X, some dipping out of high and low in >> complex ways. >> >> From what I know of time series analysis, this assumes that you have >> observations at regular intervals, such as yearly or monthly, whereas >> mine are irregularly spaced. >> >> I am familiar with time varying covariates in Cox proportional >> hazards, but not other models. >> >> I also have some non-time varying covariates that I would like to take >> into account. >> >> Can anybody recommend a command in Stata to analyse this dataset? >> >> Thankyou >> >> Karin >> >> P.S. - The dataset is very simple and basically looks like this: >> >> id type value date >> 1 X 11.1 15/09/2010 >> 1 Y 113.1 18/03/2011 >> 1 X 15 06/07/2011 >> 1 X 11.7 21/10/2011 >> 1 Y 124.5 21/10/2011 >> 1 X 14.4 27/01/2012 >> 1 X 12.9 04/05/2012 >> 1 Y 132.3 04/05/2012 >> 1 Y 116.9 07/09/2012 >> 1 X 14.7 07/09/2012 >> 1 Y 127.7 13/12/2012 >> 1 X 13.2 13/12/2012 >> 2 X 11.1 18/02/2011 >> 2 X 14.1 26/05/2011 >> 2 X 14.7 21/10/2011 >> 2 X 16.2 19/12/2011 >> 2 X 14.1 15/06/2012 >> 2 Y 119.9 03/10/2012 >> 2 X 13.8 03/10/2012 >> 2 Y 120.7 22/10/2012 >> 2 X 9.9 22/10/2012 >> 3 X 17.1 08/05/2003 >> 3 X 12 20/08/2003 >> 3 X 15.6 09/12/2003 >> 3 X 14.7 20/05/2004 >> 3 X 13.2 28/09/2004 >> 3 X 12.6 16/03/2005 >> 3 X 11.4 19/10/2005 >> 4 Y 110 26/11/2008 >> 4 X 15.6 26/11/2008 >> 4 X 15.9 04/06/2009 >> 4 Y 110.8 04/06/2009 >> 4 X 16.5 27/08/2009 >> 4 Y 100.8 27/08/2009 >> 4 Y 110.6 24/11/2009 >> 4 X 14.7 24/11/2009 >> 4 Y 100.3 25/02/2010 >> 4 X 18.3 25/02/2010 >> 4 X 22.2 01/07/2010 >> 4 Y 120.1 01/07/2010 >> 4 X 18 13/10/2010 >> 4 Y 130.6 13/10/2010 >> 4 Y 120.6 18/01/2011 >> 4 X 20.4 18/01/2011 >> 4 X 11.7 05/05/2011 >> 4 Y 110.5 05/05/2011 >> 4 Y 110.6 20/09/2011 >> 4 X 16.5 03/11/2011 >> 4 Y 120.8 03/11/2011 >> 4 Y 120.7 08/05/2012 >> 4 X 19.5 08/05/2012 >> 4 X 17.7 26/07/2012 >> 4 Y 110.6 25/01/2013 >> 4 X 15 25/01/2013 >> * >> * 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/

**References**:**st: Longitudinal analysis - help!***From:*K Jensen <[email protected]>

**Re: st: Longitudinal analysis - help!***From:*Nick Cox <[email protected]>

- Prev by Date:
**Re: st: CDF plot with normal probability axis** - Next by Date:
**Re: st: Recency Weighted cumulative exposures** - Previous by thread:
**Re: st: Longitudinal analysis - help!** - Next by thread:
**st: reshape and overtime variation** - Index(es):