View source: R/publish.CauseSpecificCox.R
publish.CauseSpecificCox | R Documentation |
Publish cause-specific Cox models
## S3 method for class 'CauseSpecificCox' publish( object, cause, confint.method, pvalue.method, factor.reference = "extraline", units = NULL, print = TRUE, ... )
object |
Cause-specific hazard model obtained with
|
cause |
Show a table for this cause. If omitted, list all causes. |
confint.method |
See |
pvalue.method |
See |
factor.reference |
See |
units |
See |
print |
If |
... |
passed on to control formatting of parameters,
confidence intervals and p-values. See
|
The cause-specific hazard ratio's are combined into one table.
Table with cause-specific hazard ratios, confidence limits and p-values.
Thomas Alexander Gerds <tab@biostat.ku.dk>
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)]) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.