Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ltx

LaTeX printing of regression results.


Description

This (generic) function prints the LaTeX code of the results of a fit from coxreg, phreg, tpchreg, or aftreg, similar to what xtable does for fits from other functions.

Usage

ltx(
  x,
  caption = NULL,
  label = NULL,
  dr = NULL,
  digits = max(options()$digits - 4, 3),
  ...
)

Arguments

x

The output from a call to coxreg, tpchreg, or aftreg

caption

A suitable caption for the table.

label

A label used in the LaTeX code.

dr

Output from a drop1 call.

digits

Number of digits to be printed.

...

Not used.

Details

The result is a printout which is (much) nicer than the standard printed output from glm and friends,

Value

LaTeX code version of the results from a run with coxreg, phreg, phreg, or aftreg.

Note

There is no method in xtable for coxreg and friends.

Author(s)

Göran Broström.

See Also

xtable, coxreg, phreg, phreg, and aftreg.

Examples

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")

eha

Event History Analysis

v2.10.0
GPL (>= 2)
Authors
Göran Broström [aut, cre], Jianming Jin [ctb]
Initial release
2022-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.