simul_adapt: This function models simultaneuous adaption and produces the...

Description Usage Arguments Value Examples

View source: R/auxi.R

Description

This function models simultaneuous adaption and produces the desired binary mask.

Usage

1
simul_adapt(M, N_t, T0, treat_indices = 0)

Arguments

M

Matrix of observed entries. The input should be N (number of units) by T (number of time periods).

N_t

Number of treated units desired.

T0

The time just before treatment for all treated units. For instance, if T0 = 2, then first two entries of treated units are counted as control and the rest are treated.

treat_indices

Optional indices for treated units. The default is sampling N_t unit from all N units randomly. However, user can manually set some units as treated.

Value

The masked matrix which is one for control units and treated units before treatment and zero for treated units after treatment.

Examples

1
simul_adapt(M = replicate(5,rnorm(5)), N_t = 3, T0 = 3)

susanathey/MCPanel documentation built on May 29, 2019, 9:51 a.m.