Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Excluding Observations


From   "Raphael Fraser" <raphael.fraser@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Excluding Observations
Date   Mon, 15 May 2006 16:55:16 -0500

Which of your variables represents the number of days since transfusion?
none of them. I am having problems creating that variable.
dov is date of visit. the variable etime was created using the following code:

bysort id (dov): gen etime = cond(_n == 1, 0, dov - dov[_n-1])

and thus is the number of days since last visit.

On 5/15/06, cryan@binghamton.edu <cryan@binghamton.edu> wrote:
Which of your variables represents the number of days since transfusion?

--Chris Ryan

> I would like to exclude from my data set all observations up to 90
> days AFTER a transfusion (i.e. t = 1). The variable etime is the  time
> elapse since last visit. Can any one help?
>
>          id         dov   t   etime
>      57   26apr1977   0      57
>      57   27apr1977   0       1
>      57   28jun1977   0      62
>      57   27jul1977   0      29
>      57   19aug1977   1      23
>      57   12sep1977   0      24


*
*   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/

*
*   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