nonparametric {robust2sls} | R Documentation |
Create indices for nonparametric bootstrap
Description
nonparametric
is used for nonparametric resampling, for example
nonparametric case or error/residual resampling. The function takes a vector
of indices that correspond to the indices of observations that should be used
in the resampling procedure.
Usage
nonparametric(
indices,
R,
size = length(indices),
replacement = TRUE,
seed = NULL
)
Arguments
indices |
A vector of indices (integer) from which to sample. |
R |
An integer specifying the number of resamples. |
size |
An integer specifying the size of the resample. Standard bootstrap suggests to resample as many datapoints as in the original sample, which is set as the default. |
replacement |
A logical value whether to sample with (TRUE) or without (FALSE) replacement. Standard bootstrap suggests to resample with replacement, which is set as the default. |
seed |
|
Value
nonparametric
returns a list of length R
containing
vectors with the resampled indices.