!Daten Agresti, S. 136 $ass y0=19 132 0 9 11 52 6 97 $ $gfac 8 x1 2 x2 2 x3 2 $ $list list0=x1+x2+x3 $ !Daten Haslett: $as y= 3 5 7 10 2 17 1 12 0 0 0 0 12 7 3 2 12 0 6 8 8 9 6 4 $ $gfac 24 a 3 b 4 c 2 $ $list LIST=a+b+c $ !Daten Conaway (LT5): $ass y1=2 0 0 2 3 0 0 0 0 0 1 0 2 4 0 0 0 0 0 0 0 0 0 0 0 0 0 5 1 0 1 4 0 0 0 0 3 2 0 2 38 4 0 2 3 0 0 0 0 2 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 4 3 0 1 4 0 0 0 1 2 0 0 5 12 $ $gfac 81 w1 3 w2 3 w3 3 w4 3 $ $lis LIST1=w1+w2+w3+w4 $ !Daten Conaway (komplett): $ass y2=2 0 0 2 3 0 0 0 0 0 1 0 2 4 0 0 0 0 0 0 0 0 0 0 0 0 0 5 1 0 1 4 0 0 0 0 3 2 0 2 38 4 0 2 3 0 0 0 0 2 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 4 3 0 1 4 0 0 0 1 2 0 0 5 12 1 2 0 2 0 0 0 0 0 1 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 5 15 1 0 0 0 2 2 0 6 53 6 0 5 1 0 0 0 0 1 1 0 3 1 0 0 1 0 0 0 0 0 0 0 0 0 1 13 0 0 0 0 0 0 0 1 7 2 0 2 7 $ $gfac 162 d 2 ww1 3 ww2 3 ww3 3 ww4 3 $ $lis LIST2=D+ww1+ww2+ww3+ww4 $ $in 'uep.mac' $ $page on $ $pr ; ; ; ' UEP' ; ' Algorithm for calculating the number of unestimable parameters' ; ' in sparse contingency tables' ; ' ==============================================================' ; ; ; ' Now comes a short demonstration of the macro UEP.' ; ; ; ' 1. Example:' ; ' -----------' ; ; 'Consider the 2x2x2 table, taken from Agresti (1990):' ; ; $ $tprint y0 2,2,2 $ $pr ; ; ' The variate is named Y0, the factors are called X1 to X3 and are ' ' collected in the list LIST0.' ; ; ' To get the number of unestimable parameters, the following instruction' ' is necessary: ' ; ; ; ; '$USE UEP Y0 LIST0 $' ; ; ; $ $use uep y0 list0 $ $pr ; ; ; ; ; ; ; ; ; ' This means that no correction of degrees of freedom is necessary ' ' because of the zero in the table above.' ; ; ' Remark: ' ; ' If a table only consists of zeros or, on the other hand, does not ' ; ' contain any zeros, an error message is printed.' ; ; ; ; ; '2. Example:' ; '-----------' ; ; ' The following 3x4x2 table is taken from Haslett (1990). The variate is' ; ' called Y and the factors A, B, C are collected in LIST.' ; ; $ $use uep y list $ $pr ; ; ; ' From the output above we can see, that the configuration ' ; ' A, B, C - the table itself - contains 5 zeros and 2 unestimable ' ; ' parameters.' ; ' So the model X1.X2.X3=0 would have 18 parameters, but 2 parameters '; ' are unestimable, so the model has (24-2)-18 = 4 degrees of freedom. ' ; ; ; ' 3.Example:' ; '----------';; ' The last example comes from Conaway (1989).' ; ; '$USE UEP Y1 LIST1 $' ; $ $use uep y1 list1 $ $pri ; 'e.g. If it is of interest to test the model M: W1.W2.W3.W4=0 ' ; ' the degrees of freedom for this model has to be calculated as follows: ' ; ; ; ' Parameter of the saturated model 81 '; ' unestimable parameters - 38 '; ' paramters of the model M - 65 '; ' unestimable parameters in M + 23 '; ' ________'; ' Degrees of freedom 1 '; ; ; ; $PR ; ; ; ' This is the end of the demonstration.'; ; ' The following data is now available:' ; ; ; ' Data Variate factors list of factors' ; ' ------------------------------------------------------------' ; ' Agresti y0 X1,X2,X3 LIST0 ' ; ' Haslett y A,B,C LIST' ; ' Conaway (LT5) y1 W1,W2,W3,W4 LIST1' ; ' Conaway (full) y2 D,WW1,WW2,WW3,WW4 LIST2' ; ' ------------------------------------------------------------' ; ; ; ' Macro UEP is already loaded, to load it again type ' ; ; ; '$IN ''UEP'' $' ; ; ; $ $page off$ $ret