Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Screening in date variables


From   "kelly johnson" <econometrics@hotmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Screening in date variables
Date   Fri, 26 Aug 2005 15:13:38 -0400

Hi,

I have a dataset, with thousands of observations) as follows:


obs Date ID X
1 7/1/05 1 0.2
2 7/2/05 1 0.3
3 7/3/05 1 0.2
4 7/4/05 1 0.1
5 7/5/05 1 0.5
6 7/6/05 1 0.6
7 6/16/05 2 0.4
8 6/17/05 2 0.4
9 6/18/05 2 0.4
10 6/19/05 2 0.2
11 6/20/05 2 0.1
12 6/21/05 2 0.3
13 6/22/05 2 0.5
14 4/11/05 3 0.2
15 4/12/05 3 0.8
16 4/13/05 3 0.7
17 4/14/05 3 0.8
18 4/15/05 3 0.2
19 4/16/05 3 0.2
20 4/17/05 3 0.3
21 4/18/05 3 0.1
22 4/16/05 3 0.5
...
1000

The ID varible is unique to each patient, and identifies them. The X variable is a metric for each day. I want to test all the observations in this dataset to see (1) how they performed during caertain time periods (i.e. how any patient's X changed between the period 7/2/05-7/4/05, etc). First I have to somehow screen for that. If they were in the given date range, then I have to calculate the percentage change in X. Also, I want to calculate the percentage change in X for each observation (as identified by the variable ID). The trouble I am having is that the trial periods are of different lengths. Any help would be appreciated!

Thank you!

Fuaad

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* 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   |   What's new   |   Site index