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!
Related Posts with Using egen to create new treatment variable
parplot: different color for byvars when using by() optionDear Stata users, I have a question about -parplot- command (SSC). This command can produce paralle…
Pooled cross section dataHi Stata users I am working with pooled cross section data (randomly sampled 26,000 SMEs over the la…
Multilevel bootstrappingHello, I am interested in bootstrapping multilevel models like this example, from the Stata manual …
Creating dummy variables using tabulate (Too many values)Hi, I would like to create about 20,000 dummy variables from one variable studentID. When I used th…
OLS and fixed effectsHi, Using OLS, I have panel data of 480 firms (10years). reg lev prof size tang growth liq i.lifec…
Subscribe to:
Post Comments (Atom)
0 Response to Using egen to create new treatment variable
Post a Comment