Introduction to heter_endo_gmm in order to estimate heterogeneous peer effect when identity equals eligibility

library(heterogeneouspeereffects)

Heterogeneous Peer Effects

The package “Heterogeneous Peer Effects” aims to estimate individual responses within groups. Our contribution to the standard linear-in-means model is that we allow individuals to respond differently to the outcomes of their peers depending on both their identity and eligibility for treatment.

In the function heter_endo_gmm, we assume that identity and eligibility coincide, meaning that eligibility is determined by identity (e.g., being Black or White). Specifically, we distinguish between: - Within-group peer effects (theta within): interactions between individuals sharing the same identity. - Between-group peer effects (theta between): interactions between individuals of different identities.

We propose a simple methodology to identify and estimate the model using partial population experiments, where only a subset of individuals within a group is eligible for treatment, and the proportion of eligible individuals varies across groups. The estimation procedure relies on the Generalized Method of Moments (GMM).


Assumptions

Our method is based on the following key assumptions:

  1. Linear-in-Means Model with Panel Data
    • The outcome depends linearly on both the average outcome and the treatment status.
  2. Treatment Distribution Assumption
    • For each observed share of eligible individuals in the population, there exist both treated and control groups.
  3. Conditional Common Trends
    • In the absence of treatment, the average change in aggregate outcomes among eligible individuals in treated groups would have been the same as in control groups.
  4. Stable Share of Eligibles
    • The proportion of eligible individuals within a group remains constant over time.

Data Requirements

To apply this methodology, the data must meet the following criteria:

The analysis is conducted at an aggregate level, considering average outcomes within each group.


Estimation Procedure

To estimate the model, the following variables are required:


Usage Examples

Estimating delta, theta_within, and theta_between with 5 parameters:

# Run estimation with default parameters (5 parameters)
test_nocov <- heter_endo_gmm(YE, YN, D, s)

# View results
print(test_nocov)

Estimating with a 3-parameter model:

# Run estimation with 3 parameters
test_bis <- heter_endo_gmm(YE, YN, D, s, n_param = 3)

Outcomes

This package return the estimated coefficients (and their p_values of ): - direct effect of treatment (delta) - intra group effect of treatment (theta_within) - inter group effect of treatment (theta_between) —

This package provides a flexible and robust framework for estimating heterogeneous peer effects in grouped data, making it applicable to various empirical settings, such as education, labor markets, and social networks.