latex.cph

0th

Percentile

LaTeX Representation of a Fitted Cox Model

Creates a file containing a LaTeX representation of the fitted model.

Keywords
models, regression, character, survival, interface
Usage
## S3 method for class 'cph':
latex(object, title,
      file=paste(first.word(deparse(substitute(object))),".tex",sep=""),
      append=FALSE, surv=TRUE, maxt=FALSE, which=NULL, varnames, columns=65, 
      inline=FALSE, before=if(inline)"" else "& &", dec=3,
      pretrans=TRUE, caption, ...) # for cph fit

## S3 method for class 'lrm': latex(object, title, file, append, which, varnames, columns, inline, before, pretrans, caption, \dots) # for lrm fit

## S3 method for class 'ols': latex(object, title, file, append, which, varnames, columns, inline, before, pretrans, caption, \dots) # ols fit

## S3 method for class 'pphsm': latex(object, title, file, append, which=NULL, varnames, columns, inline, before, pretrans, caption, \dots) # pphsm fit

## S3 method for class 'psm': latex(object, title, file, append, which=NULL, varnames, columns, inline, before, pretrans, caption, \dots) # psm fit

Arguments
object
a fit object created by a rms fitting function.
title
ignored
file
append
see latex.default
surv
if surv=TRUE was specified to cph, the underlying survival probabilities from object$surv.summary will be placed in a table unless surv=FALSE.
maxt
if the maximum follow-up time in the data (object$maxtime) exceeds the last entry in object$surv.summary, underlying survival estimates at object$maxtime will be added to the table if maxt=TRUE.
which
varnames
columns
inline
before
dec
pretrans
see latex.default
caption
a character string specifying a title for the equation to be centered and typeset in bold face. Default is no title.
...
ignored
Value

  • the name of the created file, with class c("latex","file"). This object works with latex viewing and printing commands in Hmisc.

See Also

latex.rms, rcspline.restate, latex.default

Aliases
  • latex.cph
  • latex.lrm
  • latex.ols
  • latex.pphsm
  • latex.psm
Examples
units(ftime) <- "Day"
f <- cph(Surv(ftime, death) ~ rcs(age)+sex, surv=TRUE, time.inc=60)
w <- latex(f)  #Interprets fitted model and makes table of S0(t)
               #for t=0,60,120,180,\dots   Creates file f.tex
w              #displays image, if viewer installed
latex(f,file="")   # send LaTeX code to the screen
Documentation reproduced from package rms, version 2.0-2, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.