Skip to contents

Draws without replacement at a smaller sample size; valid under weaker conditions than the bootstrap. No clean CRAN function exposes the same (data, statistic, subsample_size, n_subsamples) API; np's npsubsample is closest but is kernel-specific. Kept as an in-house implementation and flagged novel/no-clean-CRAN-equivalent.

Usage

subsampling(
  data,
  statistic,
  subsample_size = NULL,
  n_subsamples = 1000L,
  ci_level = 0.95,
  seed = 42L
)

Arguments

data

Numeric vector or matrix.

statistic

Function returning a scalar.

subsample_size

Subsample size; default floor(n^0.7).

n_subsamples

Number of subsamples.

ci_level

Confidence level.

seed

Random seed.

Value

A morie_bootstrap_result.