Skip to contents

Probability proportional to size (PPS) sampling

Usage

morie_pps_sample(df, size_col, n, seed = 42L, replace = FALSE)

Arguments

df

A data frame.

size_col

Name of the size measure column.

n

Number of units to select.

seed

Random seed.

replace

Logical; FALSE (default) uses PPS-without-replacement (Madow systematic-like), matching morie.sampling.pps_sample since 2026-05-22. TRUE reverts to the legacy Hansen-Hurwitz with-replacement scheme.

Value

Data frame of selected units with .weight (Hansen-Hurwitz weights).

Examples

# See the package vignettes for usage examples:
#   vignette(package = "rmorie")