[R] problem with survexp in survival5
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Wed Apr 5 08:28:54 CEST 2000
On Wed, 5 Apr 2000, Chong Gu wrote:
> survexp in survival5 doesn't seem to work for me. see below:
You need library(date), not library(chron), and the dates are on the
timebase for library(date), not library(chron).
> julian(6,1,1991)
[1] 7821
> as.numeric(mdy.date(6,1,1991))
[1] 11474
> library(survival5)
> library(date)
> data(ratetables)
> survexp(~ratetable(year=mdy.date(6,1,1991),
+ sex=1,age=35*365.24),times=(0:30)/6*365.24)
Call:
survexp(formula = ~ratetable(year = mdy.date(6, 1, 1991), sex = 1,
age = 35 * 365.24), times = (0:30)/6 * 365.24)
age ranges from 35 to 36 years
male: 1 female: 0
date of entry from 1Jun91 to 1Jun91
Time n.risk survival
0.0 1 1.000
60.9 1 1.000
121.7 1 0.999
...
That S-PLUS has altered library(chron) to have a time origin of 1/1/1960
rather than 1/1/1970 just adds to the confusion: in S-PLUS 5.1
> julian(6,1,1991)
[1] 11474
[Your example seems to have come from an outdated version of survival5,
BTW. There is no longer a clash with sort.list.]
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list