resample: Resample or subsample data rows

Description Usage Arguments Value Methods (by class)

Description

Resample or subsample data rows from a data.frame or a list containing data.frames, vectors and/or matrices.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
resample(data, method = c("subsample", "bootstrap"), strata = NULL,
  fraction = 0.5, ...)

## S3 method for class 'data.frame'
resample(data, method = c("subsample", "bootstrap"),
  strata = NULL, fraction = 0.5)

## S3 method for class 'list'
resample(data, method = c("subsample", "bootstrap"),
  strata = NULL, fraction = 0.5)

Arguments

data

the data used for the model fit, a data.frame or a list containing data.frames, vectors and/or matrices. See Details.

method

resampling method, either "subsample" (without replacement) or "bootstrap" (with replacement)

strata

for subsampling, a vector with length nrow(data) defining the strata

fraction

subsampling fraction

...

further arguments handed over to methods

Value

the subsampled or resampled data

Methods (by class)


fabian-s/stabpath documentation built on May 16, 2019, 9:58 a.m.