generate_individuals_from_blocks: Generate individual-level data from a list of block sizes and...

View source: R/gen_blocked_data.R

generate_individuals_from_blocksR Documentation

Generate individual-level data from a list of block sizes and block characteristics.

Description

This generates potential outcomes by sampling from the specified bivariate normal distributions within each block.

Usage

generate_individuals_from_blocks(
  n_k,
  alpha = 0,
  beta = 0,
  sigma_c = 1,
  sigma_t = 1,
  corr = 1,
  exact = FALSE
)

Arguments

n_k

Vector of block sizes

alpha

Vector of (expected) means of the control potential outcome

beta

Vector of the block-level Average Treatment Effects

sigma_c

Standard deviation of the control potential outcomes.

sigma_t

Standard deviation of the treatment potential outcomes

corr

Correlation of the potential outcomes.

exact

If TRUE generate data so we match the desired means and moments exactly. False means pull from bivariate normal.

Value

Matrix of the potential outcomes and block ids.


lmiratrix/blkvar documentation built on Nov. 18, 2024, 1:27 p.m.