-collapse- and -contract- do spring to mind.
Nick
[email protected]
[email protected]
I have a dataset that consists of students (studid) in 49 schools
(schid) responding to a survey. They were asked their impressions of the
curriculum ("do you believe time devoted to subject xxx was ....") and
all responses were categorical (with 1 denoting 'not enough', 2 denoting
'just right', and 3 being 'too much'). A slice of the data is:
list schid studid timepub08 timefin08 in 30/40
+--------------------------------------+
schid studid timep~08 timef~08
--------------------------------------
30. 2 6910 2 2
31. 2 6911 2 2
32. 2 6912 2 3
33. 2 6913 3 3
34. 4 7299 2 2
--------------------------------------
35. 4 7300 2 2
36. 4 7301 3 1
37. 4 7302 2 2
38. 4 7303 2 2
39. 4 7304 2 1
--------------------------------------
40. 4 7305 1 .
+--------------------------------------+
Question: Is there a way to generate a (or collapse this) dataset to get
school levels variables? I am interested in school level variables that
captures the number of responses to each category (1 'not enough' 2
'just right' and 3 'too much') for each question (timepub08 timefin08).
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/