fonction_simu_attrition {cdid}R Documentation

Simulate Unbalanced Panel Data

Description

This function generates a simulated dataset with treatment assignment, individual-level heterogeneity, and time-varying effects. It incorporates attrition based on individual characteristics and time periods. For more details on the methodology, see: Bellego, Benatia, and Dortet-Bernadet (2024), "The Chained Difference-in-Differences", Journal of Econometrics, https://doi.org/10.1016/j.jeconom.2023.11.002.

Usage

fonction_simu_attrition(
  N,
  TT,
  theta2_alpha_Gg,
  lambda1_alpha_St,
  sigma_alpha,
  sigma_epsilon,
  tprob
)

Arguments

N

Number of units

TT

Number of periods

theta2_alpha_Gg

Coefficient for interaction between individual heterogeneity and time in the propensity score.

lambda1_alpha_St

Coefficient for individual heterogeneity in the propensity score.

sigma_alpha

Standard deviation of individual heterogeneity (alpha).

sigma_epsilon

Standard deviation of the error term (epsilon).

tprob

Probability target to get approximately NTTtprob observations

Value

A data frame containing simulated data.

Examples

data_sim <- fonction_simu_attrition(N=150,TT=9,theta2_alpha_Gg = 0.01,
lambda1_alpha_St = 0.5, sigma_alpha = 2, sigma_epsilon = 0.5, tprob=0.5)

[Package cdid version 0.1.1 Index]