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

NULL if seed should not be set explicitly or an integer to which the seed is set. Since this function is usually used inside other functions, it might not be desirable to set a seed explicitly.

Value

nonparametric returns a list of length R containing vectors with the resampled indices.


[Package robust2sls version 0.2.2 Index]