Skip to contents

Multi-frame (dual-frame) survey weights (Hartley compositing).

Usage

morie_weights_multiframe(
  weights_a,
  weights_b,
  overlap_a,
  overlap_b,
  method = c("hartley", "optimal"),
  theta = 0.5
)

Arguments

weights_a

Numeric vector of weights from frame A (multiframe).

weights_b

Numeric vector of weights from frame B (multiframe).

overlap_a

Logical vector flagging frame-A units in overlap.

overlap_b

Logical vector flagging frame-B units in overlap.

method

Character; calibration / smoothing / variance method. Allowed values depend on the caller.

theta

Numeric tuning parameter passed to multiframe (Hartley-style overlap composition).

Value

A named list with elements weights_a and weights_b: numeric vectors of frame-A and frame-B weights with overlap units down-weighted by theta and 1 - theta respectively.

Examples

set.seed(1)
res <- morie_weights_multiframe(runif(20, 1, 2), runif(15, 1, 2),
                                rbinom(20, 1, 0.3) == 1,
                                rbinom(15, 1, 0.4) == 1)
str(res, max.level = 1)
#> List of 2
#>  $ weights_a: num [1:20] 1.266 0.686 1.573 0.954 1.202 ...
#>  $ weights_b: num [1:15] 1.935 1.212 1.652 0.563 1.267 ...