Learn R Programming

MRStdCRT (version 0.1.1)

data_sim_binary: Example Dataset: Simulated CRT (binary outcome)

Description

A simulated dataset for demonstrating MRStdCRT with a binary outcome. Treatment is assigned at the cluster level and is constant within cluster.

Usage

data(data_sim_binary)

Arguments

Format

A data frame with the following variables (10 columns):

A

Cluster-level treatment assignment (0/1), constant within cluster.

H1

Cluster-level covariate 1.

H2

Cluster-level covariate 2.

N

Cluster size recorded on each row (repeats within cluster).

X1

Individual-level covariate 1 (numeric).

X2

Individual-level covariate 2 (numeric or binary coded 0/1).

Y

Observed binary outcome (0/1).

Y0

Potential outcome under control (0/1).

Y1

Potential outcome under treatment (0/1).

cluster_id

Cluster identifier (integer or factor), constant within cluster.

Examples

Run this code
data(data_sim_binary)
head(data_sim_binary)
with(data_sim_binary, table(A, Y))

Run the code above in your browser using DataLab