Learn R Programming

HQM (version 2.0)

prep_cv2: Prepare for Cross validation index parameter selection

Description

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.

Usage

prep_cv2(in.par, data, data.id, marker_name1, marker_name2, event_time_name = 'years',
        time_name = 'year',event_name = 'status2', n, I, b)

Value

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.

Arguments

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 to_id.

marker_name1

The column name of the marker values in the data frame data.

marker_name2

The column name of the marker values in the data frame data.

event_time_name

The column name of the event times in the data frame data.

time_name

The column name of the times the marker values were observed in the data frame data.

event_name

The column name of the events in the data frame data.

n

Number of individuals.

I

Number of observations leave out for a K cross validation.

b

Bandwidth.

Details

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.

See Also

b_selection_index_optim