library("matchatr")
set.seed(1)
df <- data.frame(
case = rep(c(1, 0), each = 100),
x = rbinom(200, 1, 0.4),
age = rnorm(200, 50, 10)
)
fit <- matcha(df, outcome = "case", exposure = "x",
design = unmatched_cc(), confounders = ~ age)
summary(fit)<matchatr_fit> summary
Design: Unmatched case-control
Estimator: logistic (engine: glm_logistic)
Std. error: model-based
Conditional odds ratios (95% Wald CI):
term estimate std.error statistic p.value conf.low conf.high
<char> <num> <num> <num> <num> <num> <num>
1: (Intercept) 1.3289105 0.74085320 0.3838270 0.7011067 0.3110859 5.676899
2: x 1.1270782 0.28743963 0.4161870 0.6772732 0.6416305 1.979808
3: age 0.9933368 0.01429163 -0.4677933 0.6399324 0.9658984 1.021555
Note: the intercept is not an interpretable baseline risk in a case-control sample.