LabeljsCox: Apply label information to cox2.display object using label data
Source:R/label.R
LabeljsCox.Rd
Apply label information to cox2.display object using label data
Examples
library(survival)
fit <- coxph(Surv(time, status) ~ sex + ph.ecog + ph.karno + cluster(inst),
data = lung, model = TRUE
)
fit.table <- cox2.display(fit)
lung.label <- mk.lev(lung)
LabeljsCox(fit.table, ref = lung.label)
#> $table
#> crude HR(95%CI) crude P value adj. HR(95%CI) adj. P value
#> sex "0.6 (0.45,0.79)" "< 0.001" "0.56 (0.44,0.72)" "< 0.001"
#> ph.ecog "1.6 (1.23,2.07)" "< 0.001" "1.91 (1.22,2.98)" "0.004"
#> ph.karno "0.98 (0.97,1)" "0.076" "1.01 (0.98,1.04)" "0.416"
#>
#> $ranef
#> [,1] [,2] [,3] [,4]
#> cluster NA NA NA NA
#> inst NA NA NA NA
#>
#> $metric
#> [,1] [,2] [,3] [,4]
#> <NA> NA NA NA NA
#> No. of observations "225" NA NA NA
#> No. of events "162" NA NA NA
#> AIC "1444.57976050778" NA NA NA
#> C-Index "0.635(0.024)" NA NA NA
#>
#> $caption
#> [1] "Marginal Cox model on time ('time') to event ('status') - Group inst"
#>