srswr: Simple random sampling with replacement

srswrR Documentation

Simple random sampling with replacement

Description

Draws a simple random sampling with replacement of size n (equal probabilities, fixed sample size, with replacement).

Usage

srswr(n,N)

Arguments

n

sample size.

N

population size.

Value

Returns a vector of size N, the population size. Each element k of this vector indicates the number of replicates of unit k in the sample.

See Also

UPmultinomial

Examples

s=srswr(3,10)
#the selected units are 
which(s!=0)
#with the number of replicates 
s[s!=0]

sampling documentation built on Nov. 2, 2023, 6:26 p.m.

Related to srswr in sampling...