bal_sample_ordered: Balanced sampling with reordering

Description Usage Arguments Value

View source: R/utils_enkpf.R

Description

Same as bal.sample but permute indices to reduce the number of discontinuities in local resampling.

Draw a balanced sample of size n from 1,...,n with probabilities w such that agreement with 1:n is maximal

Multiplicities N_1, ..., N_n, i.e. element j is sampled N_j times. index = numbers of sampled elements

Author: Hans-Rudolf Kuensch

Usage

1
bal_sample_ordered(w, unif = runif(1))

Arguments

w

= probabilities (must sum to one !)

unif

= uniform (pass if deterministic behaviour wished)

Value

list(N, index)


robertsy/assimilr documentation built on May 27, 2019, 10:33 a.m.