Nested case-control design

Description

Declares a nested case-control (NCC) sample drawn from a cohort by risk-set (incidence-density) sampling: at each event time, the case is matched to ratio controls sampled from those still at risk. The classical analysis treats each sampled risk set as a stratum in a conditional partial likelihood (survival::clogit/coxph); because the controls are sampled from the risk set, the conditional odds ratio equals the hazard ratio with no rare-disease assumption.

Usage

nested_cc(strata, time, ratio = NULL)

Arguments

strata A non-empty character vector naming the column(s) that identify the sampled risk sets (the matched-set id).
time A single character string naming the event/entry time column that defines the risk sets. Carried for the inclusion-probability weight and weighted-Cox estimators built on this design.
ratio NULL or a single whole number >= 1. Controls sampled per case.

Value

A matchatr_design object of type “nested_cc” carrying the strata, time, and ratio, with a weight_spec flagged for inclusion-probability weighting.

See Also

case_cohort(), counter_matched(), matcha()

Other design constructors: case_cohort(), counter_matched(), matched_cc(), two_phase(), unmatched_cc()

Examples

library("matchatr")

nested_cc(strata = "set", time = "t")
<matchatr_design>
 Type:       Nested case-control
 Strata:     set
 Time:       t
 Weights:    inclusion-probability
nested_cc(strata = "set", time = "t", ratio = 3)
<matchatr_design>
 Type:       Nested case-control
 Strata:     set
 Time:       t
 Ratio:      3:1
 Weights:    inclusion-probability