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
Adding variable from one STATA data set to anotherDear Statalist users, Good day to you firstly. I have 2 STATA datasets, where I'd like to transfer …
'codebook' throws error with complicated missings and large samplesI'm attempting to summarize and review a new dataset using 'codebook' and am encountering an error. …
New version of cprdlinkutil on SSCThanks as always to Kit Baum, a new version of the cprdlinkutil package is now available for downloa…
Using Restricted Maximum Likelihood in random-effects meta-analysis for binary outcomesI'm coming from R, so I'm hoping to find an easy way to get a similar output with Stata. I know that…
T-Test with foreach (for 4 Variables)Hey listers, I want to do a t-test for 4 variables (buy1,sell1, buy2, sell2) (they all match certain…
Subscribe to:
Post Comments (Atom)
0 Response to Using egen to create new treatment variable
Post a Comment