R-alpha: survival4

Thomas Lumley (thomas@biostat.washington.edu)
Mon, 10 Feb 1997 11:20:28 -0800 (PST)


Date: Mon, 10 Feb 1997 11:20:28 -0800 (PST)
From: Thomas Lumley <thomas@biostat.washington.edu>
To: r-testers@stat.math.ethz.ch
Subject: R-alpha: survival4
In-Reply-To: <199702070220.PAA01993@stat13.stat.auckland.ac.nz>

A port of Therneau's survival4 library is available from 
http://www.biostat.washington.edu/~thomas/R.html
It requires R0.16.1

Everything seems to work except for the ratetable and cohort expected 
survival functions. The US mortality tables are not included in this file 
as they are very big and currently unusable.

One function (plot.cox.zph()) requires the splines library and the test 
code requires the date library, both available from the same URL. If you 
have the splines library installed it will automatically be loaded.

The library overwrites both model.frame() and model.data.frame(). The new 
model.frame() uses the global environment as the default data source when 
extracting a model.frame from a fitted model with no data argument. The 
new model.data.frame is given below. It changes the default label for a 
term such as log(x) from "log.x." to "log(x)".

"model.data.frame" <-
function (...)
{
        cn <- as.character(substitute(list(...))[-1])
        rval<-data.frame(..., col.names = cn, as.is = TRUE)
        names(rval)<-cn
        rval
}


Thomas Lumley
-----------------------------------------------------+------
Biostatistics		: "Never attribute to malice what  :
Uni of Washington	:  can be adequately explained by  :
Box 357232		:  incompetence" - Hanlon's Razor  :
Seattle WA 98195-7232	:				   :
------------------------------------------------------------


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-