Learn R Programming

resemble (version 2.2.3)

get_sample_strata: A function to assign values to sample distribution strata

Description

for internal use only! This function takes a continuous variable, creates n strata based on its distribution and assigns the corresponding starta to every value.

Usage

get_sample_strata(y, n = NULL, probs = NULL)

Value

a data table with the input y and the corresponding strata to every value.

Arguments

y

a matrix of one column with the response variable.

n

the number of strata.