get_samples_from_strata: A function for stratified calibration/validation sampling

Description Usage Arguments Value

View source: R/sample_stratified.R

Description

for internal use only! This function selects samples based on provided strata.

Usage

1
2
3
4
5
6
7
get_samples_from_strata(
  original_order,
  strata,
  samples_per_strata,
  sampling_for = c("calibration", "validation"),
  replacement = FALSE
)

Arguments

original_order

a matrix of one column with the response variable.

sampling_for

sampling to select the calibration samples ("calibration") or sampling to select the validation samples ("validation").

replacement

logical indicating if sampling with replacement must be done.

starta

the number of strata.

Value

a list with the indices of the calibration and validation samples.


resemble documentation built on Nov. 9, 2020, 5:08 p.m.