This (generic) function prints the LaTeX code of the results of a fit from
coxreg
, phreg
, or aftreg
, similar
to what xtable
does for fits from other functions.
ltx(x, caption = NULL, label = NULL, dr = NULL,
digits = max(options()$digits - 4, 3), ...)
The output from a call to coxreg
, coxreg
, or
aftreg
A suitable caption for the table.
A label used in the LaTeX code.
Output from a drop1
call.
Number of digits to be printed.
Not used.
LaTeX code version of the results from a run with
coxreg
, phreg
, or aftreg
.
The result is a printout which is (much) nicer than the standard printed
output from glm
and friends,
xtable
, coxreg
# NOT RUN {
data(oldmort)
fit <- coxreg(Surv(enter, exit, event) ~ civ + sex, data = oldmort)
dr <- drop1(fit, test = "Chisq")
ltx(fit, dr = dr, caption = "A test example.", label = "tab:test1")
# }
Run the code above in your browser using DataLab