Date: Tue, 11 Jan 2000 15:48:29 +0100
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gehard Hellriegel <detecsm_hellriegelg@WESTLB.DE>
Subject: Re: Calculating person years for cohort study (epidemiological)
Content-type: text/plain; charset=us-ascii
the following code should do it, but I'm not sure, what the 3.9 means! 3 years
and 9 months? What do you want to do with that number? Is 3 years 11 months
bigger, more, longer? For sure, but 3.11 is less than 3.9! I'd think,
month(maxdat)/12*10 would be a better value, if you want to do calculations with
it. Also I'd use month(...)-1 to avoid problems with month=12. That would return
a kind of "distance" (in Jan of the following year it is 1.0, in Feb 1.1, ...).
All in all the peace would be: ....!!put((month(maxdat)-1)/12*10,.....
infile "test.dat" missover;
length date91-date99 8
test $ test91 $ date91:mmddyy10. test92 $ date92:mmddyy10.
test93 $ date93:mmddyy10. test94 $ date94:mmddyy10.;
format date91-date99 mmddyy10.;
format mindat maxdat mmddyy10.;
lcoetzee@MY-DEJA.COM on 11.01.2000 14:17:30
Bitte antworten an lcoetzee@MY-DEJA.COM
Kopie: (Blindkopie: DeTeCSM HellriegelG/D/ExternalStaff/WLB)
Thema: Calculating person years for cohort study (epidemiological)
I have data from a 9 year cohort on people with/without a certain
disease. Everyboy was tested in January 1990 and after that any time
of the year annually. They can reamain negative (N) throughout the
follow-up or become positive (T) at any time, after which they are not
part of the study anymore. They can also be discharged or die etc. for
which there are a number of codes. My data look something like this:
test test91 date91 test92 date92 test93 date93 test94 date94 etc.
N N 08/13/91 N 06/20/92 B 09/21/93
N N 07/29/91 T 08/19/92
A person can who was tested N for the whole study, therefore
contributed 9 years to the study, whereas for example the first case in
the above dummy table would have contributed 3.9 years because he was
discharged in September 1993 and the second case would have contributed
2.8 years as he was tested positive in August 1992 and was not followed
up after that.
Would like to have a new variable containing these figures to be able
to add them up and use that figure to calculate incidence rates.
This is quite urgent as I have 4 large cohorts running (this one has
2093 observations) and it is a bit much to work out by hand
Sent via Deja.com http://www.deja.com/
Before you buy.
Mit freundlichen Gruessen
DeTeCSM, Gerhard Hellriegel
D - 40217 Duesseldorf
Tel.: +49211 826 6173
Fax: +49211 826 5393