Declares an independent (unmatched) case-control sample: cases and controls are drawn separately from the source population with no individual or frequency matching. This is the design behind the classical logistic / Mantel-Haenszel odds ratio and, when the marginal outcome prevalence q0 is supplied, the case-control-weighted marginal causal contrasts of Rose & van der Laan (2009).
Usage
unmatched_cc(prevalence = NULL, strata = NULL)
Arguments
prevalence
NULL or a single number in (0, 1). The marginal outcome prevalence q0 in the source population. Required for case-control-weighted (“ccw_*“) estimators, which reweight the sample back to the population; optional for the conditional / classical odds-ratio estimators, which do not need it.
strata
NULL or a non-empty character vector naming the column(s) to stratify on for the Mantel-Haenszel estimator (estimator = “mh”), e.g. “agegrp” or c(“agegrp”, “sex”). Several columns are crossed into a single stratifying factor. Used only by “mh”; the “logistic” estimator adjusts for covariates via confounders instead, and “mh” with no strata reduces to the crude single-table odds ratio.
Details
Weights are never stored as a data column. The weight_spec records the intended scheme (case-control weighting when q0 is present, otherwise none); the weighting layer realises it as observation weights into the estimation engine.
Value
A matchatr_design object of type“unmatched_cc” carrying the prevalence, the Mantel-Haenszel strata, and a weight_spec describing the case-control weighting scheme.