This is actually fairly tricky because if no one selects that response the program doesn't "know" that the response even exists. The student's data were in Stata so I did a quick search over the internet using Stata's findit command and found a nifty program by Nick Cox called tabcount. Here's an example of how the command looks.
tabcount item1, v1(1/5)In this example, item1 is the variable name and v1(1/5) indicates the range of possible response values. This command would have to be repeated 30 times for 30 items each with different ranges of response values.
The tabcount program would work fine for the student, but I though that I could write one that would be easier for the student to use. So, I created tablabel which uses the value labels for each of the items to define the range of values. Here is what the command looked like for the student's data.
tablabel item1-item30And here's the output from one of the items.
Variable: item4 -- ethnicity
Value Freq Label
1 24 hispanic
2 211 asian
3 0 african-amer
4 143 white
Missing observations: 1
If you would like to try tablabel for yourself just type,
findit tablabelin the Stata command line and follow the installation instructions. Remember, the variables need to have value labels already defined.
pbe
No comments:
Post a Comment