[R] Survival: pyears and ratetable: expected events

Jim Trabas jim.trabas at gmail.com
Fri May 27 23:35:24 CEST 2011


I tried again but I cannot get a valid expected number of death directly from
the pyear function. Using cross multiplication from Lifetables I am
expecting in my cohort about 26 expected deaths (to match the 25 observed
deaths). I have tried different variation of the pyears syntax but i get
either 0.05 expected deaths or something like 25000. I have used different
age and fu formats but I get no plausible result

Could anyone help me with the syntax?

Should the following syntax work getting the expected number of deaths? I am
having no luck getting the thing to work.

pyears(Surv(fu,ev)~ratetable(sex=sex, age=age,year=yearofsurgery),
ratetable=expsurv.us, scale=365.25)$expected

sex is a factor (male, female)
ev=1 is death ev=0 censored at last fu
fu is in days
age is in days
year of surgery is as.Date


Any ideas?
JT

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



More information about the R-help mailing list