Learn R Programming

nonprobsampling (version 0.1.0)

multi_matrix_construction: Construct block design matrices for multi-reference calibration

Description

Construct block design matrices for multi-reference calibration

Usage

multi_matrix_construction(vars_XC, sc, sp_list, xcol, wts_cols)

Value

A list with components:

Xc

Numeric design matrix for `sc`, with intercept prepended, of dimension \(n_c \times p\).

Xp_list

List of numeric design matrices for each reference sample. The first block includes an intercept column; subsequent blocks do not.

wts_list

List of numeric weight vectors, one per reference sample.

Arguments

vars_XC

Character vector of all predictor variables (union across reference samples), used to build the `sc` design matrix `Xc`.

sc

Data frame. The nonprobability sample.

sp_list

List of reference sample data frames.

xcol

List of character vectors: the variables contributed by each reference sample (as returned by `check_input_multi`).

wts_cols

Character vector of survey-weight column names, one per element of `sp_list`.