Skip to contents

Closed-form linear calibration to match population totals on auxiliary X. When survey is installed, defers to survey::calibrate() for a fully design-aware result; otherwise computes the linear adjustment in base R.

Usage

morie_weights_greg(weights, X, population_totals, max_iter = 50, tol = 1e-08)

Arguments

weights

Numeric vector of unit-level design weights.

X

A numeric matrix or data.frame of auxiliary variables (one row per unit) used by GREG / nonresponse propensity models.

population_totals

Named numeric vector of target totals to calibrate to.

max_iter

Iteration cap for calibration / IPF.

tol

Convergence tolerance for calibration.