blocked_experiment: Simulated block-randomized experiment

blocked_experimentR Documentation

Simulated block-randomized experiment

Description

Residents of two neighborhoods, with 25 residents treated in each. The neighborhoods differ in size, so assignment probabilities differ across blocks: 0.5 in the 50-resident neighborhood and 0.25 in the 100-resident one. The treatment effect also differs by neighborhood.

Usage

blocked_experiment

Format

blocked_experiment

A tibble with 150 rows and 9 columns:

neighborhood

Block identifier, 1 or 2

lambda

Poisson rate governing the outcome, 10 in neighborhood 1 and 5 in neighborhood 2

resident

Subject identifier within neighborhood

Y_Z_0, Y_Z_1

Count potential outcomes under control and treatment

Z

Random assignment, 1 for treatment and 0 for control

Z_cond_prob

Probability of the assigned condition, which varies by block

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, clustered_experiment, continuous_interaction, covariate_adjustment, noncompliance_experiment, patriot_act, two_arm_trial


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