Learn R Programming

survJamda (version 1.1.4)

shuffle.samples: Shuffle samples.

Description

To ensure the applicability of Cox regression, the function splits the samples randomly and assigns at least one deceased or relapsed patient to the training and testing sets.

Usage

shuffle.samples(n, censor, train.nb)

Arguments

n
Sample size of the complete data set.
censor
Vector of censoring status. 1 = event occurred, 0 = censored.
train.nb
Number of samples in the training set.

Value

List of two vectors, the indices of the training set and the indices of the testing set.

Warning

This function is not called by the user directly.