Learn R Programming

rbvs (version 1.0.2)

subsample: Generates subsamples.

Description

Generates subsamples.

Usage

subsample(n, m, B)

Arguments

n
The sample size.
m
Subsample size (an integer lower or equal than n).
B
Number of sample splits.

Value

Matrix with the indices of the subsamples drawn in each column.

Details

Generates m-element subsamples drawn $floor(n/m)$ times from 1,...,n independently without replacement; such subsampling is repeated B times.

References

R. Baranowski, P. Fryzlewicz (2015), Ranking Based Variable Selection, in submission (http://personal.lse.ac.uk/baranows/rbvs/rbvs.pdf)).

Examples

Run this code
subsample(10,5,2)
subsample(10,3,10)

Run the code above in your browser using DataLab