publish.CauseSpecificCox: Tabulizing cause-specific hazard ratio from all causes with...

View source: R/publish.CauseSpecificCox.R

publish.CauseSpecificCoxR Documentation

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 class 'CauseSpecificCox'
publish(
  object,
  cause,
  confint.method,
  pvalue.method,
  factor.reference = "extraline",
  units = NULL,
  print = TRUE,
  ...
)

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.

Details

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

Value

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

Author(s)

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

Examples

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)])
}


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