* 10nov99 revision * ---------------------------------------------------- * ---------------------------------------------------- * Log file * NOTE: Path to .log file should be modified as needed. log using c:\!docs\S210a\condl2.log * ---------------------------------------------------- * ---------------------------------------------------- * 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 replace fehome=. if fehome==0 * Gunlaw has missing data scored as 9, 0. replace gunlaw=. if gunlaw==9 replace gunlaw=. if gunlaw==0 * News has NAP cases scored as 0. replace news=. if news==0 * Polviews has various missing data scored as 8 or 9. replace polviews=. if polviews>7 * Sex has no missing data. * ---------------------------------------------------- * ---------------------------------------------------- * GENDER AND NEWSPAPER READING * Frequency counts tab sex news * Joint and marginal probabilities tab sex news , cell * Newspaper reading, conditional on gender * (Also, marginal probabilities of newspaper reading) tab sex news , row * Gender, conditional on newspaper reading * (Also, marginal probabilities of gender) tab sex news , column * Assess how nearly independent gender and newspaper reading are: * ...by visually comparing conditional probabilities of news, given sex tab sex news , row nofreq * ...by visually comparing conditional probabilities of sex, given news tab sex news , column nofreq * ...by formally applying a Chi-square test to the null * statistical hypothesis of independence tab sex news , nofreq chi2 * ---------------------------------------------------- * ---------------------------------------------------- * GENDER AND ATTITUDE TOWARD WOMEN IN HOME OR POLITICS * Frequency counts tab sex fehome * Joint and marginal probabilities tab sex fehome , cell * Women's place, conditional on gender * (Also, marginal probabilities of women's place) tab sex fehome , row * Gender, conditional on women's place * (Also, marginal probabilities of gender) tab sex fehome , column * 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 * ...by visually comparing conditional probabilities of sex, given * women's place tab sex fehome , column nofreq * ...by formally applying a Chi-square test to the null * statistical hypothesis of independence tab sex fehome , nofreq chi2 * ---------------------------------------------------- * ---------------------------------------------------- * GENDER AND ATTITUDE TOWARD GUN LAW * Frequency counts tab sex gunlaw * Joint and marginal probabilities tab sex gunlaw , cell * Gunlaw, conditional on gender * (Also, marginal probabilities of gunlaw) tab sex gunlaw , row * Gender, conditional on gunlaw * (Also, marginal probabilities of gender) tab sex gunlaw , column * Assess how nearly independent gender and gunlaw are: * ...by visually comparing conditional probabilities of gunlaw, * given sex tab sex gunlaw , row nofreq * ...by visually comparing conditional probabilities of sex, given * gunlaw tab sex gunlaw , column nofreq * ...by formally applying a Chi-square test to the null * statistical hypothesis of independence tab sex gunlaw , nofreq chi2 * ---------------------------------------------------- * ----------------------------------------------------