Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using egen to create new treatment variable

    Hi, I am looking at a study involving student performance and gender.

    Students are observed taking courses over time. Each course has a particular component to it (e.g. 50% assignment, 50% exam). Thus, in terms of notation we can write the observations as ijk, where i refers to the individual, j refers to the course, and k refers to the component. Fixed effects analysis has already been conducted (at different levels).

    I am trying to create a new variable, treatment, that is 1 if the course (j) does not have a particular component in 2020, and 0 otherwise.

    However, because the data is listed at the component (k) level, I am having trouble doing so. In other words, I am trying to create a variable at the j level, which is dependent on changes (across time) at the k level.

    Any idea how I can go about doing so?

    Thank you so much!

  • #2
    You might get a more useful response if you post a sample of your data using -dataex- and explain there with reference to this data what you want.

    Comment

    Working...
    X