Learn R Programming

nonprobsampling (version 0.1.0)

check_ipwm_inputs_estimate: Validate inputs at the estimation stage

Description

Checks that `build` is a valid `pw_fit` object with all required internal fields, that `y` names a numeric or factor column in the raw convenience sample, and that `zcol` (if supplied) is a supported domain variable with at least two non-missing levels in both the full sample and the build-stage complete cases.

Usage

check_ipwm_inputs_estimate(build, y, zcol = NULL)

Value

`invisible(TRUE)` on success; stops with an informative message on failure.

Arguments

build

A `pw_fit` object returned by the build step.

y

Single character string naming the numeric or categorical outcome variable in `build$internal$raw_sc`.

zcol

Single character string naming the domain variable in `build$internal$raw_sc`, or NULL for the overall mean.