Learn R Programming

HMC (version 1.1)

index_spliter: Split the sample index into n_folds many groups so that we can perform cross-fitting

Description

Split the sample index into n_folds many groups so that we can perform cross-fitting

Usage

index_spliter(array, n_folds = 5)

Value

A list indicates the sample indices in each split.

Arguments

array

Sample index. Usually just an array from 1 to the number of samples in one group.

n_folds

Number of splits