| wdsmatchATT | R Documentation |
Estimates the population average treatment effect on the treated (PATT) using survey-weighted double score matching. Treated units are matched to controls using the control-side double score consisting of propensity probability and control prognostic score. Only the missing control outcome requires imputation; treated outcomes remain observed. Aggregation uses treated-side survey weights and Hajek normalization.
wdsmatchATT(
Y,
X,
Z,
weights,
M = 5,
ps = NULL,
pg = NULL,
model.ps = NULL,
model.pg = NULL,
sampling = c("retrospective", "prospective"),
use.bias.correction = TRUE,
varest = TRUE,
boots = 200,
alpha = 0.05
)
Y |
Finite numeric vector of observed outcomes, with no missing values. |
X |
Numeric matrix or data frame with finite numeric covariate columns,
one row per unit, and unique names other than |
Z |
Binary treatment indicator (1 = treated, 0 = control), with one entry per unit and both groups represented. |
weights |
Finite, strictly positive numeric vector of survey design weights, with one entry per unit. Required. |
M |
Positive integer number of nearest neighbors (default 5). Each
required donor arm must contain at least |
ps |
Optional finite numeric vector of pre-estimated propensity
probabilities strictly between zero and one. If |
pg |
Optional matrix of pre-estimated prognostic scores, with columns
|
model.ps |
Formula for the propensity model, such as
|
model.pg |
Formula for the prognostic regression, such as
|
sampling |
Character: |
use.bias.correction |
Logical: apply the arm-specific complete
quadratic bias correction (default |
varest |
Logical: compute replication variance and a centered normal
Wald interval (default |
boots |
Integer number of multinomial replicates, at least 2 when variance is requested (default 200). |
alpha |
Significance level strictly between zero and one (default
0.05). The interval confidence level is |
PATT uses only the control-side prognostic and bias-correction regressions; a treated-outcome regression is not required. Treatment identification uses one-sided unconfoundedness of the control potential outcome, together with the required survey identification, positivity, and regularity assumptions.
Matching, score fitting, arm-specific quadratic bias correction, strict
numerical checks, and the behavior of supplied scores follow
wdsmatchATE. The PATT replication expression retains the
original weighted control reuse coefficients and normalizes by the
replicate's treated-side survey-weight total. Variance uses divisor
boots; intervals are centered normal Wald intervals. All requested
replicates must succeed, otherwise an informative error is raised.
Supplied scores remain fixed during replication, so their external
estimation uncertainty is excluded. With
use.bias.correction = FALSE, matching discrepancies remain and the
bias-corrected asymptotic justification does not automatically apply.
The weight-only interface and individual-unit multinomial replication do
not provide general variance estimation for arbitrary clustered or
stratified survey designs. See wdsmatchATE for full details.
A list of class wdsmatch with the same components as
wdsmatchATE, with estimate targeting PATT and
estimand identifying PATT.
data(survey_obs)
fit <- wdsmatchATT(
Y = survey_obs$Y,
X = survey_obs[, c("X1", "X2", "X3", "X4", "X5", "X6")],
Z = survey_obs$Z,
weights = survey_obs$survey_weight,
M = 3,
model.ps = Z ~ X1 + X2 + X3 + X4 + X5 + X6 + X1:X2,
model.pg = Y ~ X1 + X2 + X3 + X4 + X5 + X6 + X1:X2,
sampling = "retrospective",
varest = FALSE
)
fit
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.