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
egen problemHi list, I want to generate a variable that equals the mean of the values of the first two nonmissi…
New to stata, Impossible problem for a summary table?Hello all- I'm so glad I found this forum! I've just started working with stata for a biostats class…
Diff in diff: Fix data for one-to-one matching propensity scoreI have a data set of companies with the date they were acquired by a business group and a control gr…
Assigning colors to stacked bar plot with ordinal y-variable.Dear Forum, I would like to plot a stacked bar graph of an "outcome" over hiv status (positive vs. …
"Encode" a String with another String?Hello: I am trying to create a long code list where var1 is a string and what it should represent is…
Subscribe to:
Post Comments (Atom)
0 Response to Counting unique ID who taught a course in a given district and school
Post a Comment