Hi
I have 100 observations in Stata, where each observations has 4 variables: student_id, school, level and class.
I want to generate a variable (Class_size), which tells me how many students belong to the same class, that is how many students_id share the same values of school, level and class. Is there a way to do this in Stata?
I have 100 observations in Stata, where each observations has 4 variables: student_id, school, level and class.
I want to generate a variable (Class_size), which tells me how many students belong to the same class, that is how many students_id share the same values of school, level and class. Is there a way to do this in Stata?
Comment