[R] Survival: pyears and ratetable: expected events

Jim Trabas jim.trabas at gmail.com
Thu May 26 19:56:17 CEST 2011


Dear all,

I am having a (really) hard time getting pyears to work together with a
ratetable to give me the number of expected events (deaths).

I have the following data:

dos, date of surgery, as.Date
dof, date of last follow-up, as.Date
dos, date of surgery, as.Date
sex, gender, as.factor (female,male)
ev, event(death), 0= censored at time point dof, 1=death at time point dof

Could someone please help. I am searching the web 5 days now and I cannot
find any simple example that I can reproduce or fit to my needs.

I have managed to get the patient years the conventional way: I use pyears
to tcut the follow up time by  age and year of surgery, and by sex. Then I
do cross multiplication with the life tables I have obtained and customized.

I have seen that the use of a ratetable together with the pyears function
can produce the expected deaths, but I have not been successful applying it
to my data.

Could someone please help me with the syntax?

Many thanks in advance
JT


--
View this message in context: http://r.789695.n4.nabble.com/Survival-pyears-and-ratetable-expected-events-tp3553208p3553208.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list