Description
Sample rows with replacement from a matrix
Usage
boot_df(x_matrix, y_sur, ID = NULL, size = 10^5, seed = 1, prob = NULL)
Value
A list with the sampled explanatory matrix and the sampled qualitative surrogate (y_sur)
Arguments
- x_matrix
matrix to perform sampling on
- y_sur
The numeric vector of the qualitative surrogate.
- ID
The patient ID
- size
size of matrix returned
- seed
seed for sampling
- prob
Vector for weight sampling