Description Usage Arguments Details Value Author(s) References
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.
1 | ldr.slices(y, nslices = 3)
|
y |
a vector of length |
nslices |
the number of slices, no larger than |
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.
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 |
Kofi Placid Adragni <kofi@umbc.edu>
Cook, RD and Weisberg, S (1999), Applied Regression Including Computing and Graphics, New York: Wiley.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.