View source: R/coxph_methods.R
tidy.std_surv | R Documentation |
Tidy summarizes information about the components of the standardized model fit.
## S3 method for class 'std_surv'
tidy(x, ...)
x |
An object of class std_surv |
... |
Not currently used |
A data.frame
require(survival)
set.seed(8)
n <- 300
Z <- rnorm(n)
X <- rnorm(n, mean = Z)
time <- rexp(n, rate = exp(X + Z + X * Z)) # survival time
C <- rexp(n, rate = exp(X + Z + X * Z)) # censoring time
U <- pmin(time, C) # time at risk
D <- as.numeric(time < C) # event indicator
dd <- data.frame(Z, X, U, D)
x <- standardize_coxph(
formula = Surv(U, D) ~ X + Z + X * Z,
data = dd, values = list(X = seq(-1, 1, 0.5)), times = c(2,3,4)
)
tidy(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.