| extract_CoxNCSpline | R Documentation |
This is a function to extract log HR based on the resuls from CoxNCSpline
extract_CoxNCSpline(fit, lag, latency)
fit |
A model from CoxNCSpline |
lag |
A lag time, or a vector of lag times |
latency |
prespecified latency |
A data frame with one row per lag, giving the estimated log HR and its variance at each lag time
time_start <- "age_start"
time_end <- "age_end"
status <- "failure"
exposure <- paste0("lag", 0:19)
knots_number <- 3
latency <- 20
fit <- CoxNCSpline(sim_data, time_start, time_end, status, exposure, knots_number, latency)
extract_CoxNCSpline(fit, 10, latency = latency)
extract_CoxNCSpline(fit, c(0, 5, 10), latency = latency)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.