Skip to contents

A declarative marker for stack_frames()'s overlaps argument. Instead of naming columns that already hold the chance each unit had in every frame, it names the registers, and samplyr resolves the chances from each component's own design with exante_probabilities().

This is the capability the expected multiframe estimator needs and that a sample alone cannot supply: the probability a unit would have had in a frame it was not selected from. It is exact, and it is checked against what actually happened, because a component's own resolved chance has to equal the design weight the execution produced.

Usage

exante_overlaps(frames, by)

Arguments

frames

A named list of registers, one per frame, with the same names as the components of the stack. Each is the population the corresponding design would draw from.

by

A single named string matching the stack's key to the column holding it in the registers, in the same direction as a join: by = c(person_id = "person_id").

Value

An object of class samplyr_exante_overlap_spec, for stack_frames()'s overlaps argument.

Examples

exante_overlaps(
  frames = list(
    area = data.frame(person_id = 1:10),
    list = data.frame(person_id = 5:14)
  ),
  by = c(person_id = "person_id")
)
#> ℹ Overlap probabilities to resolve from 2 registers, keyed by person_id