Learn R Programming

Publish (version 2023.01.17)

publish.CauseSpecificCox: Tabulizing cause-specific hazard ratio from all causes with confidence limits and Wald test p-values.

Description

Publish cause-specific Cox models

Usage

# S3 method for CauseSpecificCox
publish(
  object,
  cause,
  confint.method,
  pvalue.method,
  factor.reference = "extraline",
  units = NULL,
  print = TRUE,
  ...
)

Value

Table with cause-specific hazard ratios, confidence limits and p-values.

Arguments

object

Cause-specific hazard model obtained with CSC.

cause

Show a table for this cause. If omitted, list all causes.

confint.method

See regressionTable

pvalue.method

See regressionTable

factor.reference

See regressionTable

units

See regressionTable

print

If TRUE print the table(s).

...

passed on to control formatting of parameters, confidence intervals and p-values. See summary.regressionTable.

Author

Thomas Alexander Gerds <tab@biostat.ku.dk>

Details

The cause-specific hazard ratio's are combined into one table.

Examples

Run this code
if (requireNamespace("riskRegression",quietly=TRUE)){
library(riskRegression)
library(prodlim)
library(survival)
data(Melanoma,package="riskRegression")
fit1 <- CSC(list(Hist(time,status)~sex,Hist(time,status)~invasion+epicel+age),
            data=Melanoma)
publish(fit1)
publish(fit1,pvalue.stars=TRUE)
publish(fit1,factor.reference="inline",units=list("age"="years"))

# wide format (same variables in both Cox regression formula) 
fit2 <- CSC(Hist(time,status)~invasion+epicel+age, data=Melanoma)
publish(fit2)

# with p-values
x <- publish(fit2,print=FALSE)
table <- cbind(x[[1]]$regressionTable,
           x[[2]]$regressionTable[,-c(1,2)])
}

Run the code above in your browser using DataLab