[R] xtable for Cox model output

Frank E Harrell Jr fharrell at virginia.edu
Thu Oct 3 02:48:39 CEST 2002


On Wed, 02 Oct 2002 13:44:23 -0400
Ravi Varadhan <rvaradha at jhsph.edu> wrote:

> Hi:
> 
> I am using R 1.5.0 on Windows.  I was not able to get the xtable 
> function in the "xtable" library to recognize a Cox model object 
> from "survival" library. I was wondering whether there is another way 
> to do this.
> 
> thanks,
> Ravi.
> 
>

library(Design)   # uses library(survival) and library(Hmisc)
f <- cph(Surv(dtime,event) ~ ...., surv=TRUE) # modification of coxph
w <- latex(f)   # creates f.tex for LaTeX representation of model fit

latex.cph will represent regression splines (from rcs(x,knots)) and interactions in good algebraic form.

Frank Harrell
Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences
U. Virginia School of Medicine  http://hesweb1.med.virginia.edu/biostat
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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