Stata 15.1
I have a list of students who are taking certain courses. Some of the courses have level 1, 2, 3, or 4. Right now, if a student is in a course that has more than 1 level, it appears that they have taken that course many times when it should only show up once. I want to put them in the right course and level.
Example 1:
Variables: Student, course, level
Student A, course 2000, level 1
Student A, course 3000, level 1
Student A, course 3000, level 2
Student A, course 3000, level 3
Student A, course 3000, level 4
Student A, course 4000, level 2
I would like my final data set to look like this:
Student A, course 2000, level 1
Student A, course 3000, level 3
Student A, course 4000, level 2
Example 2:
Variables: Student, course, level
Student B, course 3000, level 1
Student B, course 3000, level 2
Student B, course 3000, level 3
Student B, course 3000, level 4
Student B, course 4000, level 3
I would like my final data set to look like this:
Student B, course 3000, level 1
Student B, course 4000, level 3
Should I be using bysort, egen command? What command is there for sequencing or ordering of observations by course and level? Any guidance would be great!
Related Posts with Confusion about how to keep students in the right courses in the right level
How does one put formatted date labels into excel with Putexcel?*Hi there, Here's my code: local vars "date" foreach pre in `vars'{ putexcel set "tabout/cleaning…
Binscatter2 - faster, enhanced binned scatterplots in StataHi all, I wanted to make note of a program that I've had available on GitHub for a while now to gen…
creating a variable that takes a value of the difference of the last non-missing value and the first non-missing value in panel datai have panel time series. I want to create a variable that is the difference between the last non-mi…
Extracting a specific part of a string if the string contains an exact syntaxOK, so I'm not explaining this very well but here is what I want to do. I have data as shown below. …
Proportional odd assumption for ordered logit regression in panel dataRespected sir, I am using xtologit command for ordered logit regression for panel data. My dependent…
Subscribe to:
Post Comments (Atom)
0 Response to Confusion about how to keep students in the right courses in the right level
Post a Comment