Learn R Programming

Publish (version 2023.01.17)

summary.regressionTable: Formatting regression tables

Description

Preparing regression results for publication

Usage

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

Value

List with two elements:

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

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

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.

Author

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

See Also

publish.glm publish.coxph

Examples

Run this code
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)")

Run the code above in your browser using DataLab