Learn R Programming

nonprobsampling (version 0.1.0)

ipwm_multi_build: Build pseudo-weights for the multi-reference calibration method

Description

Build pseudo-weights for the multi-reference calibration method

Usage

ipwm_multi_build(
  sc,
  sp,
  vars,
  weight,
  sp_des,
  sp_order,
  control,
  verbose = FALSE,
  log_messages = NULL
)

Value

A list with components:

pseudo_weights

Numeric vector of estimated pseudo-weights for `sc`.

coefficients

Named numeric vector of participation model coefficients.

method

Character scalar, always `"multi"`.

solver_diagnostics

List of solver convergence diagnostics.

internal

List of intermediate objects (block design matrices, reference weighted totals, block column indices, sandwich components, and sorted metadata) needed by the estimation stage.

Arguments

sc

Data frame. The nonprobability sample.

sp

List of data frames. Each element is one probability reference sample (already NA-processed and p_formula-processed).

vars

List of character vectors, one per reference sample, giving the predictor variable names shared with `sc`.

weight

Character vector, one per reference sample, giving the survey-weight column name in each element of `sp`.

sp_des

List of `survey.design2` or `svyrep.design` objects, one per reference sample.

sp_order

Character scalar, either `"size"` (sort reference samples largest-first) or `"given"` (keep user order).

control

A list created by `pw_solver_control()`.

verbose

Logical. If `TRUE`, progress messages are printed.

log_messages

Character vector of messages accumulated in earlier steps, forwarded into the returned object.