summary.regressionTable: Formatting regression tables

View source: R/summary.regressionTable.R

summary.regressionTableR Documentation

Formatting regression tables

Description

Preparing regression results for publication

Usage

## S3 method for class 'regressionTable'
summary(object, show.missing = "ifany", print = TRUE, ...)

Arguments

object

object obtained with regressionTable or summary.regressionTable.

show.missing

Decide if number of missing values are shown. Either logical or character. If 'ifany' then number missing values are shown if there are some.

print

If TRUE print results.

...

Used to control formatting of parameter estimates, confidence intervals and p-values. See examples.

Value

List with two elements:

  • regressionTable: the formatted regression table (a data.frame)

  • rawTable: table with the unformatted values (a data.frame)

Author(s)

Thomas A. Gerds <tag@biostat.ku.dk>

See Also

publish.glm publish.coxph

Examples

library(survival)
data(pbc)
pbc$edema <- factor(pbc$edema,levels=c("0","0.5","1"),labels=c("0","0.5","1"))
fit = coxph(Surv(time,status!=0)~age+sex+edema+log(bili)+log(albumin)+log(protime),
            data=pbc)
u=summary(regressionTable(fit))
u$regressionTable
u$rawTable
summary(regressionTable(fit),handler="prettyNum")
summary(regressionTable(fit),handler="format")
summary(regressionTable(fit),handler="sprintf",digits=c(2,2),pValue.stars=TRUE)
summary(regressionTable(fit),handler="sprintf",digits=c(2,2),pValue.stars=TRUE,ci.format="(l,u)")

Publish documentation built on Jan. 18, 2023, 1:08 a.m.