bal.sample: Balanced sampling

Description Usage Arguments Value

View source: R/utils_enkpf.R

Description

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

Author: Hans-Rudolf Kuensch, Date: 21 Apr 2010. Modified by Sylvain Robert (added unif as argument and some names)

Usage

1
bal.sample(w, R = length(w), unif = runif(1))

Arguments

w

= probabilities (must sum to one !)

R

= sample size

unif

= uniform (pass if deterministic behaviour wished)

Value

list(N, index)


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