groups.cv: Split a data set for cross-validation

Description Usage Arguments Details Value Warning Author(s)

Description

Define the folds of cross-validation.

Usage

1
groups.cv(n, ngroup, censor)

Arguments

n

Sample size of a data set.

ngroup

Number of folds of cross-validation.

censor

Vector of censoring status. In the censoring status vector, 1 = event occurred, 0 = censored.

Details

The function avoids allocating only censored patients to the testing set. At least one patient having experienced an event is needed for the applicability of the Cox proportional hazard model.

Value

The folds of cross-validation.

Warning

This function is not called by the user directly.

Author(s)

Haleh Yasrebi


survJamda documentation built on May 1, 2019, 8:50 p.m.