R/cox2.R
cox2.display.Rd
Table for coxph.object with model option: TRUE - allow "frailty" or "cluster" model
cox2.display(cox.obj.withmodel, dec = 2, msm = NULL)
cox.obj.withmodel | coxph.object with model option: TRUE |
---|---|
dec | Decimal point, Default: 2 |
msm | Multi state model, Default: NULL |
Table, cluster/frailty info, metrics, caption
GEE like - cluster, Mixed effect model like - frailty
#> Warning: data set ‘lung’ not foundfit1 <- coxph(Surv(time, status) ~ ph.ecog + age + cluster(inst), data = lung, model = TRUE) fit2 <- coxph(Surv(time, status) ~ ph.ecog + age + frailty(inst), data = lung, model = TRUE) cox2.display(fit1)#> $table #> crude HR(95%CI) crude P value adj. HR(95%CI) adj. P value #> ph.ecog "1.61 (1.25,2.08)" "< 0.001" "1.56 (1.22,2)" "< 0.001" #> age "1.02 (1.01,1.03)" "0.007" "1.01 (1,1.02)" "0.085" #> #> $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 226.000 NA NA NA #> No. of events 163.000 NA NA NA #> AIC 1463.797 NA NA NA #> #> $caption #> [1] "Marginal Cox model on time ('time') to event ('status') - Group inst" #>cox2.display(fit2)#> $table #> crude HR(95%CI) crude P value adj. HR(95%CI) adj. P value #> ph.ecog "1.64 (1.31,2.05)" "< 0.001" "1.58 (1.26,1.99)" "< 0.001" #> age "1.02 (1,1.04)" "0.041" "1.01 (0.99,1.03)" "0.225" #> #> $ranef #> [,1] [,2] [,3] [,4] #> frailty NA NA NA NA #> inst NA NA NA NA #> #> $metric #> [,1] [,2] [,3] [,4] #> <NA> NA NA NA NA #> No. of observations 226.000 NA NA NA #> No. of events 163.000 NA NA NA #> AIC 1463.223 NA NA NA #> #> $caption #> [1] "Frailty Cox model on time ('time') to event ('status') - Group inst" #>