Hello all,
I am trying to solve the following problem within stata. I am using data on student enrollments. It looks like this:
I am trying to identify which students took the math course before they took the physics course, such as student 1. They took math in term 47 and then subsequently took physics in term 48. On the other hand, student 2 took physics before math, so I would want to exclude them from the identifying flag.
In short, I am trying to create the flag variable in the table above. The ultimate goal is to do a t-test to see if taking math before physics has an effect on success.
Any help would be greatly appreciated.
Kevin
I am trying to solve the following problem within stata. I am using data on student enrollments. It looks like this:
course id | student id | term | success | flag |
math | 1 | 47 | 1 | 1 |
physics | 1 | 48 | 1 | 1 |
physics | 2 | 48 | 1 | 0 |
math | 2 | 49 | 0 | 0 |
physics | 3 | 51 | 1 | 0 |
math | 4 | 52 | 1 | 0 |
In short, I am trying to create the flag variable in the table above. The ultimate goal is to do a t-test to see if taking math before physics has an effect on success.
Any help would be greatly appreciated.
Kevin
Comment