svycox.display: svycoxph.display: table for svycoxph.object in survey...

View source: R/svycox.R

svycox.displayR Documentation

svycoxph.display: table for svycoxph.object in survey package.

Description

Table for complex design cox model.

Usage

svycox.display(svycoxph.obj, decimal = 2)

Arguments

svycoxph.obj

svycoxph.object

decimal

digit, Default: 2

Details

DETAILS

Value

List including table, metric, caption

See Also

svycoxph AIC

Examples

library(survival)
data(pbc)
pbc$sex <- factor(pbc$sex)
pbc$stage <- factor(pbc$stage)
pbc$randomized <- with(pbc, !is.na(trt) & trt > 0)
biasmodel <- glm(randomized ~ age * edema, data = pbc, family = binomial)
pbc$randprob <- fitted(biasmodel)

if (is.null(pbc$albumin)) pbc$albumin <- pbc$alb ## pre2.9.0

dpbc <- survey::svydesign(
  id = ~1, prob = ~randprob, strata = ~edema,
  data = subset(pbc, randomized)
)

model <- survey::svycoxph(Surv(time, status > 0) ~ sex + protime + albumin + stage,
  design = dpbc
)
svycox.display(model)

jstable documentation built on Oct. 20, 2024, 5:07 p.m.