survey_obs: Simulated Survey Observational Data

survey_obsR Documentation

Simulated Survey Observational Data

Description

A simulated dataset drawn from a survey-weighted observational study with treatment-dependent (retrospective) sampling. Contains 6 covariates, a binary treatment indicator, observed outcome, and survey design weights. The true PATE is approximately 0.8 and the true PATT approximately 1.0.

Usage

survey_obs

Format

A data frame with approximately 120 rows and 9 variables:

Y

Observed outcome (continuous).

Z

Binary treatment indicator (1 = treated, 0 = control).

X1, X2, X3, X4, X5, X6

Pre-treatment covariates (continuous). The true propensity and prognostic models include an X1:X2 interaction.

survey_weight

Survey design weight (inverse selection probability).

Details

Generated by a simulation where:

  • Treatment assignment: P(Z=1|X) = \text{logit}^{-1}(0.3 + 0.6 X_1 + 0.4 X_2 - 0.3 X_3 + 0.2 X_1 X_2).

  • Outcome model: Y(0) = 1 + X_1 + 0.5 X_2 - 0.3 X_3 + 0.2 X_4 + 0.3 X_1 X_2 + \varepsilon, with treatment effect \tau(X) = 0.8 + 0.2 X_1.

  • Survey selection: treatment-dependent (retrospective) with P(S=1|Z,X) = \text{logit}^{-1}(-2 + 0.3 Z + 0.2 X_1 + 0.15 X_2).

Source

Simulated data; see data-raw/make_survey_data.R.

Examples

data(survey_obs)
head(survey_obs)

# Estimate PATE
fit <- wdsmatchATE(Y = survey_obs$Y, X = survey_obs[, 3:8],
                   Z = survey_obs$Z, weights = survey_obs$survey_weight,
                   M = 3, varest = FALSE)
fit


wdsmatch documentation built on Sept. 12, 2026, 1:06 a.m.