STA429/1007 Assignment 6
Quiz on Thursday Nov. 4th
This assignment is based upon lecture material on the "subdivision" approach to controlling for extraneous independent variables. Treatment in the online text is sketchy. The example of berkeley.sas may be useful.
Remember, the idea here is that you can test the association between two categorical variables controlling for a third variable, by producing separate tables (and associated chisquare statistics) for each value of the third variable. Then you add chisquare values and add degrees of freedom.
What about p-values? Well, you can look up critical values in just about any statistics text, but it's nicer to use software. In the following example, we add up three 2-degree-of-freedom tests and obtain the p-value with proc iml.
proc iml; xsq = 2.12+3.74+1.21; pval = 1-probchi(xsq,6); print "Chisquare = " xsq ", df = 6, p = " pval;
Here is the output:
XSQ PVAL Chisquare = 7.07 , df = 6, p = 0.3144222
The (non-random) sample here consists of prisoners in U.S. Jails (in Florida, I believe) who were convicted of first degree murder. The prisoners are either Black of White, the victims were either Black or White, and the prisoner either got the death penalty or not. If you are interested in more detail, the reference is Am. Soc. Review 1981, 46, 918-927. Of course you do not need to go to the library to do this assignment.
The data are available in the file deathpen.dat. The variables are
Please do the following.