| prep_cv2 | R Documentation |
Implements the calculation of the hqm estimator on cross validation data sets. This is a preparation for the cross validation index selection technique for future conditional hazard rate estimation based on marker information data.
prep_cv2(in.par, data, data.id, marker_name1, marker_name2, event_time_name = 'years',
time_name = 'year',event_name = 'status2', n, I, b)
in.par |
Vector of candidate indexing values. |
data |
A data frame of time dependent data points. Missing values are allowed. |
data.id |
An id data frame obtained from |
marker_name1 |
The column name of the marker values in the data frame |
marker_name2 |
The column name of the marker values in the data frame |
event_time_name |
The column name of the event times in the data frame |
time_name |
The column name of the times the marker values were observed in the data frame |
event_name |
The column name of the events in the data frame |
n |
Number of individuals. |
I |
Number of observations leave out for a K cross validation. |
b |
Bandwidth. |
The function splits the data set via dataset_split and calculates for every splitted data set the hqm estimator
\hat{h}_x(t) = \frac{\sum_{i=1}^n \int_0^T\hat{\alpha}_i(\theta_0^T X_i(t+s))Z_i(t+s)Z_i(s)K_{b}(x-\theta_0^T X_i(s))\mathrm {d}s}{\sum_{i=1}^n\int_0^TZ_i(t+s)Z_i(s)K_{b}(x-\theta_0^T X_i(s))\mathrm {d}s},
for all x on the marker grid and t on the time grid, where X is the marker, Z is the exposure and \alpha(z) is the marker-only hazard, see get_alpha for more details.
A list of matrices for every cross validation data set with \hat{h}_x(t) for all x on the marker grid and t on the time grid.
b_selection_index_optim
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.