------------------------------------------------------------------------------------------------------ log: /Users/rossman/Documents/f08_210A/homework_w8.txt log type: text opened on: 16 Nov 2008, 20:25:22 . use http://www.sscnet.ucla.edu/08F/soc210a-1/oscars.dta, clear . tab female actor_nom, chi2 | Actor Nominated Female | 0 1 | Total -----------+----------------------+---------- 0 | 37,968 213 | 38,181 1 | 14,702 209 | 14,911 -----------+----------------------+---------- Total | 52,670 422 | 53,092 Pearson chi2(1) = 96.8203 Pr = 0.000 . tab screenwriter actor_nom, chi2 | Actor Nominated who wrote the film | 0 1 | Total ---------------------+----------------------+---------- no prior nominations | 34,374 139 | 34,513 nominated | 17,645 269 | 17,914 nom but blacklisted | 651 14 | 665 ---------------------+----------------------+---------- Total | 52,670 422 | 53,092 Pearson chi2(2) = 195.2568 Pr = 0.000 . use http://www.sscnet.ucla.edu/08F/soc210a-1/dixie.dta, clear . tab blacklist chain, chi2 | chain blacklist | cc citadel cumulus infinity misc | Total -----------+-------------------------------------------------------+---------- 0 | 42 12 3 11 28 | 96 1 | 28 6 10 8 76 | 128 -----------+-------------------------------------------------------+---------- Total | 70 18 13 19 104 | 224 Pearson chi2(4) = 27.1800 Pr = 0.000 . net describe tab_chi, from(http://fmwww.bc.edu/RePEc/bocode/t) ------------------------------------------------------------------------------------------------------ package tab_chi from http://fmwww.bc.edu/RePEc/bocode/t ------------------------------------------------------------------------------------------------------ TITLE 'TAB_CHI': modules for tabulation and chi-square tasks DESCRIPTION/AUTHOR(S) chitest and chitesti carry out chi-square tests for univariate frequency distributions. chitesti is the immediate command version of chitest. Both require Stata 8; earlier versions are available as chitest6 and chitesti6. tabchi and tabchii produce two-way tables of frequencies with chi-square and residuals, including observed and expected frequencies and raw, Pearson and adjusted residuals. tabchii is the immediate command version of tabchi. Both will run in Stata 6 or better. tabm produces tabulation of multiple variables in Stata 7 or better. tabsort produces one- and two-way tables with sorted rows and/or columns. tabsort will run in Stata 6 or better. tabsplit tabulates string variables split into parts. tabsplit requires Stata 8; an earlier version is available as tabsplit6. Author: Nicholas J. Cox, University of Durham Support: email N.J.Cox@durham.ac.uk Distribution-Date: 20040518 INSTALLATION FILES (type net install tab_chi) ../c/chitest.ado ../c/chitest.hlp ../c/chitesti.ado ../c/chitesti.hlp ../c/chitest6.ado ../c/chitest6.hlp ../c/chitesti6.ado ../c/chitesti6.hlp tabchi.ado tabchi.hlp tabchii.ado tabchii.hlp tabm.ado tabm.hlp tabsort.ado tabsort.hlp tabsort6.ado tabsort6.hlp tabsplit.ado tabsplit.hlp tabsplit6.ado tabsplit6.hlp ------------------------------------------------------------------------------------------------------ . net install tab_chi checking tab_chi consistency and verifying not already installed... all files already exist and are up to date. . tabchi blacklist chain, pearson observed frequency expected frequency Pearson residual ------------------------------------------------------------ | chain blacklist | cc citadel cumulus infinity misc ----------+------------------------------------------------- 0 | 42 12 3 11 28 | 30.000 7.714 5.571 8.143 44.571 | 2.191 1.543 -1.089 1.001 -2.482 | 1 | 28 6 10 8 76 | 40.000 10.286 7.429 10.857 59.429 | -1.897 -1.336 0.943 -0.867 2.150 ------------------------------------------------------------ Pearson chi2(4) = 27.1800 Pr = 0.000 likelihood-ratio chi2(4) = 27.7391 Pr = 0.000 . exit, clear