View source: R/durham_method.R
durham_ve | R Documentation |
This method is based on smoothing scaled residuals from the Cox proportional hazard regression model. It consists of four steps. First, an ordinary proportional hazard model is fitted using a partial likelihood function. Second, Schoenfeld residuals are calculated. These residuals are used to test the independence between residuals and time. Third, the residuals are scaled and added to the coefficient from the ordinary proportional hazard regression model. Fourth, after smoothing we can get the estimated hazard ratios as function of time by recovering the time-varying regression coefficient. This allows testing the hypothesis of no VE waning and the estimation of TVE at each time point.
durham_ve(x, df = 2, n_days, n_periods, n_days_period, var)
x |
survival object |
df |
degrees of freedom |
n_days |
number of days in the study |
n_periods |
number of periods in the study |
n_days_period |
number of days per period |
var |
name of variable to assess |
tibble of VE estimates for each period (the estimate for each period is the average VE over the days within each period.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.