Learn R Programming

fixest (version 0.12.1)

base_did: Sample data for difference in difference

Description

This data has been generated to illustrate the use of difference in difference functions in package fixest. This is a balanced panel of 104 individuals and 10 periods. About half the individuals are treated, the treatment having a positive effect on the dependent variable y after the 5th period. The effect of the treatment on y is gradual.

Usage

data(base_did)

Arguments

Format

base_did is a data frame with 1,040 observations and 6 variables named y, x1, id, period, post and treat.

y

The dependent variable affected by the treatment.

x1

An explanatory variable.

id

Identifier of the individual.

period

From 1 to 10

post

Indicator taking value 1 if the period is strictly greater than 5, 0 otherwise.

treat

Indicator taking value 1 if the individual is treated, 0 otherwise.