Learn R Programming

nonprobsampling (version 0.1.0)

dispatch_estimator: Dispatch the estimator across domains

Description

Determines the domain mode (overall, binary, or factor) from `yz_data` and calls `dispatch_estimator_one_domain()` for each domain, returning a unified result list.

Usage

dispatch_estimator(build, yz_data)

Value

A list with components:

- `type`: either `"single"` or `"multi"`. - `labels`: character vector of domain labels. - `estimates`: a list of per-domain results, each with `mean` and `variance`.

Arguments

build

A `pw_fit` object returned by the build step.

yz_data

A list returned by `process_na_yz()`, containing `Y`, `w`, `X`, and `domain`.