extract_CoxNCSpline: This is a function to extract log HR based on the resuls from...

View source: R/CoxNCSpline.R

extract_CoxNCSplineR Documentation

This is a function to extract log HR based on the resuls from CoxNCSpline

Description

This is a function to extract log HR based on the resuls from CoxNCSpline

Usage

extract_CoxNCSpline(fit, lag, latency)

Arguments

fit

A model from CoxNCSpline

lag

A lag time, or a vector of lag times

latency

prespecified latency

Value

A data frame with one row per lag, giving the estimated log HR and its variance at each lag time

Examples

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)

LatencyA documentation built on Oct. 21, 2026, 5:14 p.m.