covariate_adjustment: Simulated experiment with a pretreatment covariate

covariate_adjustmentR Documentation

Simulated experiment with a pretreatment covariate

Description

A completely randomized experiment in which a continuous pretreatment covariate predicts the outcome, so adjusting for it buys precision.

Usage

covariate_adjustment

Format

covariate_adjustment

A tibble with 100 rows and 9 columns:

ID

Subject identifier

U

Unobserved subject-level shock

X

Continuous pretreatment covariate

Y_Z_0, Y_Z_1

Continuous potential outcomes under control and treatment

Z

Random assignment, 1 for treatment and 0 for control

Z_cond_prob

Probability of the assigned condition, 0.5 throughout

Y

Revealed outcome

condition

Z labelled "Treatment" and "Control"

Source

\Sexpr[results=rd]{tools:::Rd_expr_doi("10.7910/DVN/VE6VSR")}

See Also

Other Data: attrition_experiment, blocked_experiment, clustered_experiment, continuous_interaction, noncompliance_experiment, patriot_act, two_arm_trial


vayr documentation built on Aug. 22, 2026, 1:08 a.m.