. . * ---------------------------------------------------- . * ---------------------------------------------------- . . * Log file: condl2.log . * Do file: condl2.do . * 10nov99 revision by McFarland . . * Crosstabs for discussion of joint, conditional, and . * marginal probabilities, and independence. . . * ---------------------------------------------------- . * ---------------------------------------------------- . * Data . * NOTE: Path to .dta file should be modified as needed. . use fehome gunlaw news polviews sex using c:\!docs\S210a\gss94.dta . . * ---------------------------------------------------- . * Missing data . . * Fehome has missing data scored 9 and 0 . replace fehome=. if fehome==9 (6 real changes made, 6 to missing) . replace fehome=. if fehome==0 (1015 real changes made, 1015 to missing) . . * Gunlaw has missing data scored as 9, 0. . replace gunlaw=. if gunlaw==9 (8 real changes made, 8 to missing) . replace gunlaw=. if gunlaw==0 (996 real changes made, 996 to missing) . . * News has NAP cases scored as 0. . replace news=. if news==0 (1038 real changes made, 1038 to missing) . . * Polviews has various missing data scored as 8 or 9. . replace polviews=. if polviews>7 (113 real changes made, 113 to missing) . . * Sex has no missing data. . . * ---------------------------------------------------- . * ---------------------------------------------------- . . * GENDER AND NEWSPAPER READING . . * Frequency counts . tab sex news respondents| how often does r read newspaper sex| EVERYDAY FEW TIME ONCE A W LESS THA NEVER | Total -----------+-------------------------------------------------------+---------- MALE | 419 180 110 70 26 | 805 FEMALE | 550 272 151 126 50 | 1149 -----------+-------------------------------------------------------+---------- Total| 969 452 261 196 76 | 1954 . . * Joint and marginal probabilities . tab sex news , cell respondents| how often does r read newspaper sex| EVERYDAY FEW TIME ONCE A W LESS THA NEVER | Total -----------+-------------------------------------------------------+---------- MALE | 419 180 110 70 26 | 805 | 21.44 9.21 5.63 3.58 1.33 | 41.20 -----------+-------------------------------------------------------+---------- FEMALE | 550 272 151 126 50 | 1149 | 28.15 13.92 7.73 6.45 2.56 | 58.80 -----------+-------------------------------------------------------+---------- Total| 969 452 261 196 76 | 1954 | 49.59 23.13 13.36 10.03 3.89 | 100.00 . . * Newspaper reading, conditional on gender . * (Also, marginal probabilities of newspaper reading) . tab sex news , row respondents| how often does r read newspaper sex| EVERYDAY FEW TIME ONCE A W LESS THA NEVER | Total -----------+-------------------------------------------------------+---------- MALE | 419 180 110 70 26 | 805 | 52.05 22.36 13.66 8.70 3.23 | 100.00 -----------+-------------------------------------------------------+---------- FEMALE | 550 272 151 126 50 | 1149 | 47.87 23.67 13.14 10.97 4.35 | 100.00 -----------+-------------------------------------------------------+---------- Total| 969 452 261 196 76 | 1954 | 49.59 23.13 13.36 10.03 3.89 | 100.00 . . * Gender, conditional on newspaper reading . * (Also, marginal probabilities of gender) . tab sex news , column respondents| how often does r read newspaper sex| EVERYDAY FEW TIME ONCE A W LESS THA NEVER | Total -----------+-------------------------------------------------------+---------- MALE | 419 180 110 70 26 | 805 | 43.24 39.82 42.15 35.71 34.21 | 41.20 -----------+-------------------------------------------------------+---------- FEMALE | 550 272 151 126 50 | 1149 | 56.76 60.18 57.85 64.29 65.79 | 58.80 -----------+-------------------------------------------------------+---------- Total| 969 452 261 196 76 | 1954 | 100.00 100.00 100.00 100.00 100.00 | 100.00 . . * Assess how nearly independent gender and newspaper reading are: . . * ...by visually comparing conditional probabilities of news, given sex . tab sex news , row nofreq respondents| how often does r read newspaper sex| EVERYDAY FEW TIME ONCE A W LESS THA NEVER | Total -----------+-------------------------------------------------------+---------- MALE | 52.05 22.36 13.66 8.70 3.23 | 100.00 FEMALE | 47.87 23.67 13.14 10.97 4.35 | 100.00 -----------+-------------------------------------------------------+---------- Total| 49.59 23.13 13.36 10.03 3.89 | 100.00 . . * ...by visually comparing conditional probabilities of sex, given news . tab sex news , column nofreq respondents| how often does r read newspaper sex| EVERYDAY FEW TIME ONCE A W LESS THA NEVER | Total -----------+-------------------------------------------------------+---------- MALE | 43.24 39.82 42.15 35.71 34.21 | 41.20 FEMALE | 56.76 60.18 57.85 64.29 65.79 | 58.80 -----------+-------------------------------------------------------+---------- Total| 100.00 100.00 100.00 100.00 100.00 | 100.00 . . * ...by formally applying a Chi-square test to the null . * statistical hypothesis of independence . tab sex news , nofreq chi2 Pearson chi2(4) = 6.0829 Pr = 0.193 . . * ---------------------------------------------------- . * ---------------------------------------------------- . . * GENDER AND ATTITUDE TOWARD WOMEN IN HOME OR POLITICS . . * Frequency counts . tab sex fehome respondents| women take care of home not cou sex| AGREE DISAGREE NOT SURE | Total -----------+---------------------------------+---------- MALE | 113 662 38 | 813 FEMALE | 155 970 33 | 1158 -----------+---------------------------------+---------- Total| 268 1632 71 | 1971 . . * Joint and marginal probabilities . tab sex fehome , cell respondents| women take care of home not cou sex| AGREE DISAGREE NOT SURE | Total -----------+---------------------------------+---------- MALE | 113 662 38 | 813 | 5.73 33.59 1.93 | 41.25 -----------+---------------------------------+---------- FEMALE | 155 970 33 | 1158 | 7.86 49.21 1.67 | 58.75 -----------+---------------------------------+---------- Total| 268 1632 71 | 1971 | 13.60 82.80 3.60 | 100.00 . . * Women's place, conditional on gender . * (Also, marginal probabilities of women's place) . tab sex fehome , row respondents| women take care of home not cou sex| AGREE DISAGREE NOT SURE | Total -----------+---------------------------------+---------- MALE | 113 662 38 | 813 | 13.90 81.43 4.67 | 100.00 -----------+---------------------------------+---------- FEMALE | 155 970 33 | 1158 | 13.39 83.77 2.85 | 100.00 -----------+---------------------------------+---------- Total| 268 1632 71 | 1971 | 13.60 82.80 3.60 | 100.00 . . * Gender, conditional on women's place . * (Also, marginal probabilities of gender) . tab sex fehome , column respondents| women take care of home not cou sex| AGREE DISAGREE NOT SURE | Total -----------+---------------------------------+---------- MALE | 113 662 38 | 813 | 42.16 40.56 53.52 | 41.25 -----------+---------------------------------+---------- FEMALE | 155 970 33 | 1158 | 57.84 59.44 46.48 | 58.75 -----------+---------------------------------+---------- Total| 268 1632 71 | 1971 | 100.00 100.00 100.00 | 100.00 . . * Assess how nearly independent gender and women's place are: . . * ...by visually comparing conditional probabilities of women's . * place, given sex . tab sex fehome , row nofreq respondents| women take care of home not cou sex| AGREE DISAGREE NOT SURE | Total -----------+---------------------------------+---------- MALE | 13.90 81.43 4.67 | 100.00 FEMALE | 13.39 83.77 2.85 | 100.00 -----------+---------------------------------+---------- Total| 13.60 82.80 3.60 | 100.00 . . * ...by visually comparing conditional probabilities of sex, given . * women's place . tab sex fehome , column nofreq respondents| women take care of home not cou sex| AGREE DISAGREE NOT SURE | Total -----------+---------------------------------+---------- MALE | 42.16 40.56 53.52 | 41.25 FEMALE | 57.84 59.44 46.48 | 58.75 -----------+---------------------------------+---------- Total| 100.00 100.00 100.00 | 100.00 . . * ...by formally applying a Chi-square test to the null . * statistical hypothesis of independence . tab sex fehome , nofreq chi2 Pearson chi2(2) = 4.8212 Pr = 0.090 . . . * ---------------------------------------------------- . * ---------------------------------------------------- . . . * GENDER AND ATTITUDE TOWARD GUN LAW . . * Frequency counts . tab sex gunlaw respondents| favor or oppose gun permits sex| FAVOR OPPOSE DK | Total -----------+---------------------------------+---------- MALE | 614 251 8 | 873 FEMALE | 937 155 23 | 1115 -----------+---------------------------------+---------- Total| 1551 406 31 | 1988 . . * Joint and marginal probabilities . tab sex gunlaw , cell respondents| favor or oppose gun permits sex| FAVOR OPPOSE DK | Total -----------+---------------------------------+---------- MALE | 614 251 8 | 873 | 30.89 12.63 0.40 | 43.91 -----------+---------------------------------+---------- FEMALE | 937 155 23 | 1115 | 47.13 7.80 1.16 | 56.09 -----------+---------------------------------+---------- Total| 1551 406 31 | 1988 | 78.02 20.42 1.56 | 100.00 . . * Gunlaw, conditional on gender . * (Also, marginal probabilities of gunlaw) . tab sex gunlaw , row respondents| favor or oppose gun permits sex| FAVOR OPPOSE DK | Total -----------+---------------------------------+---------- MALE | 614 251 8 | 873 | 70.33 28.75 0.92 | 100.00 -----------+---------------------------------+---------- FEMALE | 937 155 23 | 1115 | 84.04 13.90 2.06 | 100.00 -----------+---------------------------------+---------- Total| 1551 406 31 | 1988 | 78.02 20.42 1.56 | 100.00 . . * Gender, conditional on gunlaw . * (Also, marginal probabilities of gender) . tab sex gunlaw , column respondents| favor or oppose gun permits sex| FAVOR OPPOSE DK | Total -----------+---------------------------------+---------- MALE | 614 251 8 | 873 | 39.59 61.82 25.81 | 43.91 -----------+---------------------------------+---------- FEMALE | 937 155 23 | 1115 | 60.41 38.18 74.19 | 56.09 -----------+---------------------------------+---------- Total| 1551 406 31 | 1988 | 100.00 100.00 100.00 | 100.00 . . * Assess how nearly independent gender and gunlaw are: . . * ...by visually comparing conditional probabilities of gunlaw, . * given sex . tab sex gunlaw , row nofreq respondents| favor or oppose gun permits sex| FAVOR OPPOSE DK | Total -----------+---------------------------------+---------- MALE | 70.33 28.75 0.92 | 100.00 FEMALE | 84.04 13.90 2.06 | 100.00 -----------+---------------------------------+---------- Total| 78.02 20.42 1.56 | 100.00 . . * ...by visually comparing conditional probabilities of sex, given . * gunlaw . tab sex gunlaw , column nofreq respondents| favor or oppose gun permits sex| FAVOR OPPOSE DK | Total -----------+---------------------------------+---------- MALE | 39.59 61.82 25.81 | 43.91 FEMALE | 60.41 38.18 74.19 | 56.09 -----------+---------------------------------+---------- Total| 100.00 100.00 100.00 | 100.00 . . * ...by formally applying a Chi-square test to the null . * statistical hypothesis of independence . tab sex gunlaw , nofreq chi2 Pearson chi2(2) = 68.7837 Pr = 0.000 . . . * ---------------------------------------------------- . * ---------------------------------------------------- . . . . end of do-file . .