Hi,
I imagine this question has already been answered but I cannot seem to find it. I want to figure out the number of teachers who taught a given course in a school and district. I have tried various different options, but none give me what I am looking for. Here is what I have tried:
egen N_Tpercourse = count(staffid), bysort (leanumber schoolnumber coursecode) /// this option counts the total number of times the staffid appears.
egen N_Tpercourse = gropu (staffid leanumber schoolnumber coursecode)
I have tried other things but none seem to do what I want them to do. Any suggestions? Or can you point me to where this question has already been answered? Thanks in advance.
Related Posts with Counting unique ID who taught a course in a given district and school
help with display of coefficients in a plotwhat could be the problem when one of the coefficients from the linear regression model is not displ…
Changing marker symbols for each level of an interaction using marginsplotHi everyone, I am using Stata 14.2 and the default scheme (s2color) to plot the conditional margina…
post stratification weightsDear all, I am analysing a survey in Stata and would need to get some means and regression coeffici…
connecting several coefficients across sub-graphs - CoefplotHi statalister, I have an issue with connecting coeficients results using coefplot (Stata journal v…
Missing birth year in one panel observation issueI have an issue in my data set that looks like this: ID Year Birth Year 1 2000 1990 1 2002 This iss…
Subscribe to:
Post Comments (Atom)
0 Response to Counting unique ID who taught a course in a given district and school
Post a Comment