Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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)

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.

Source

This data has been generated from R.


fixest

Fast Fixed-Effects Estimations

v0.10.0
GPL-3
Authors
Laurent Berge [aut, cre], Sebastian Krantz [ctb], Grant McDermott [ctb] (<https://orcid.org/0000-0001-7883-8573>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.