get.tvcoef | R Documentation |
The function gives the time-varying coefficients based on a fitted coxtv
or coxtp
subject.
Users can specify the time points to calculate the time-varying coefficients.
get.tvcoef(fit, time)
fit |
model from |
time |
time points to calculate the time-varying coefficients. If |
A matrix of the time-varying coefficients. The dimension is the length of time
by nvars
, where nvars
is the number
of covariates in the fitted mode.
Each row represents the time-varying coefficients at the corresponding time.
z <- ExampleData$z
time <- ExampleData$time
event <- ExampleData$event
fit <- coxtv(event = event, z = z, time = time, degree = 2)
coef <- get.tvcoef(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.