






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Its Sociologists Statistics handout. Key points are: Categorical Variable, Wordpad or Notepad, Commands, Graphics Commands, Simple Table, Row Col Cell, Categorical Variable, Value of Sex, Percentage, Bar Chart
Typology: Study notes
1 / 11
This page cannot be seen from the preview
Don't miss anything!







. tab educ vote, row
| Key |
|---|
| frequency |
| row percentage |
+----------------+
| vote education | A N NA U Y | Total -----------+-------------------------------------------------------+---------- 1 | 0 0 0 1 0 | 1 | 0.00 0.00 0.00 100.00 0.00 | 100. -----------+-------------------------------------------------------+---------- NA | 0 2 1 3 5 | 11 | 0.00 18.18 9.09 27.27 45.45 | 100. -----------+-------------------------------------------------------+---------- P | 52 266 71 295 422 | 1, | 4.70 24.05 6.42 26.67 38.16 | 100. -----------+-------------------------------------------------------+---------- PS | 32 224 24 52 130 | 462 | 6.93 48.48 5.19 11.26 28.14 | 100. -----------+-------------------------------------------------------+---------- S | 103 397 72 237 311 | 1, | 9.20 35.45 6.43 21.16 27.77 | 100. -----------+-------------------------------------------------------+---------- Total | 187 889 168 588 868 | 2,
If there is another categorical variable and you would like to see what the same table looks like for each value of that variable. For example, “by sex:” tells it to make two tables, one for each value of sex. But first I sorted the data according to sex (sort sex).
. sort sex . by sex: tab educ vote, row
-> sex = F
| Key |
|---|
| frequency |
| row percentage |
+----------------+
| vote education | A N NA U Y | Total -----------+-------------------------------------------------------+---------- NA | 0 2 0 1 4 | 7 | 0.00 28.57 0.00 14.29 57.14 | 100. -----------+-------------------------------------------------------+---------- P | 32 112 36 177 250 | 607 | 5.27 18.45 5.93 29.16 41.19 | 100. -----------+-------------------------------------------------------+---------- PS | 15 86 7 31 60 | 199 | 7.54 43.22 3.52 15.58 30.15 | 100. -----------+-------------------------------------------------------+---------- S | 57 163 27 153 166 | 566 | 10.07 28.80 4.77 27.03 29.33 | 100. -----------+-------------------------------------------------------+---------- Total | 104 363 70 362 480 | 1, | 7.54 26.32 5.08 26.25 34.81 | 100.
-> sex = M
+----------------+
| Key |
|---|
| frequency |
| row percentage |
+----------------+
| vote education | A N NA U Y | Total -----------+-------------------------------------------------------+---------- 1 | 0 0 0 1 0 | 1 | 0.00 0.00 0.00 100.00 0.00 | 100. -----------+-------------------------------------------------------+---------- NA | 0 0 1 2 1 | 4 | 0.00 0.00 25.00 50.00 25.00 | 100. -----------+-------------------------------------------------------+---------- P | 20 154 35 118 172 | 499 | 4.01 30.86 7.01 23.65 34.47 | 100. -----------+-------------------------------------------------------+----------
0 10 20 30 40 sum of type_BC sum of type_PROF sum of type_WC