Re: [R] Survival: pyears and ratetable: expected events

From: Terry Therneau <>
Date: Tue, 31 May 2011 07:07:30 -0500

> 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),
>, scale=365.25)$expected

Your syntax is fine. It looks like you built your own rate table, and I'm guessing that something was done incorrectly at that step. The dimensions etc are fussy for a rate table, and it is easy to get them wrong.

Terry Therneau mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue 31 May 2011 - 12:12:50 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 31 May 2011 - 13:20:11 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive