Learn R Programming

nonprobsampling (version 0.1.0)

ipwm_one_build: Dispatch one-reference pseudo-weight estimation

Description

Dispatch one-reference pseudo-weight estimation

Usage

ipwm_one_build(
  sc,
  sp,
  sp_des,
  vars = NULL,
  weight,
  method,
  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 identifying the method used.

solver_diagnostics

List of solver convergence diagnostics.

internal

List of intermediate objects (design matrices, fitted probabilities, sandwich components) needed by the estimation stage.

Arguments

sc

Data frame. The nonprobability sample.

sp

Data frame. The single probability reference sample (already NA-processed and p_formula-processed).

sp_des

A `survey.design2` or `svyrep.design` object for `sp`.

vars

Character vector of predictor variable names to use in the participation model design matrices.

weight

Character scalar. Name of the survey-weight column in `sp`.

method

Character scalar. One of `"alp"`, `"clw"`, `"calibration"`, or `"cali"`.

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.