inst/tinytest/test-pkg-survival.R

source("helpers.R")
requiet("survival")

# Issue #547
bladder1 <- bladder[bladder$enum < 5, ]
mod <- coxph(
    Surv(stop, event) ~ (rx + size + number) * strata(enum),
    cluster = id, bladder1, robust = TRUE)
tab <- modelsummary(mod, estimate = "p.value", fmt = 10, statistic = NULL, gof_map = NA, output = "dataframe")
p <- coef(summary(mod))[, "Pr(>|z|)"]
expect_equivalent(as.numeric(tab[["(1)"]]), p, ignore_attr = TRUE)

Try the modelsummary package in your browser

Any scripts or data that you put into this service are public.

modelsummary documentation built on Oct. 15, 2023, 5:06 p.m.