Learn R Programming

msir (version 1.3.3)

msir.slices: Slice a vector into slices of approximately equal size

Description

Function used for slicing a continuous response variable.

Usage

msir.slices(y, nslices)

Arguments

y

a vector of \(n\) values

nslices

the number of slices, no larger than \(n\)

Value

Returns a list with components:

slice.indicator

an indicator variable for the slices.

nslices

the actual number of slices produced.

slice.sizes

the number of observations in each slice.

See Also

msir