ldr.slices: Function to slice continuous response.

Description Usage Arguments Details Value Author(s) References

View source: R/ldr.slices.R

Description

Divides a vector of length n into slices of approximately equal size. It is used to construct the piecewise bases, and internally used in lad functions.

Usage

1
ldr.slices(y, nslices = 3)

Arguments

y

a vector of length n.

nslices

the number of slices, no larger than n.

Details

The number of observations per slice m is computed as the largest integer less or equal to n/nslices. The n observations of y are ordered in the increasing order. The first set of first m observations is allocated to the first slice, the second set is allocated into the second slice, and so on.

Value

Returns a named list with four elements as follows:

bins

Slices with their observations

nslices

The actual number of slices produced.

slice.size

The number of observations in each slice.

slice.indicator

Vector of length n indicating the slice number of each observed response value.

Author(s)

Kofi Placid Adragni <kofi@umbc.edu>

References

Cook, RD and Weisberg, S (1999), Applied Regression Including Computing and Graphics, New York: Wiley.


ldr documentation built on May 2, 2019, 2:13 p.m.

Related to ldr.slices in ldr...