Learn R Programming

Publish (version 2017.10.24)

summary.regressionTable: Formatting regression tables

Description

Preparing regression results for publication

Usage

# S3 method for 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)

See Also

publish.glm publish.coxph

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab