Article View: sci.math.stat
Article #35Re: Bug [or feature?] in BMDP 4F
From: Jerry Dallal
Date: Fri, 30 Oct 1992 18:55
Date: Fri, 30 Oct 1992 18:55
59 lines
3460 bytes
3460 bytes
This is a repost to correct a typo . . .
In article <1992Oct29.223353.887@access.usask.ca>, bickis@skmath3 (M. Bickis) writes:
[and I edited . . .]
> I was analyzing a large but somewhat sparse contingency
> table on BMDP 4F. I noticed, almost by accident, that the program was
> not calculating the degrees-of-freedom for some log-linear models correctly.
> A bit of playing around convinced me that the problem was due to the
> sparseness of the table.
> Finally, I came upon an almost parenthetical comment in the
> 1990 manual p.304:
> "We recommend that you add a constant to all cells when you have empty
> cells in your data that are not to be treated as structural zeros.
> Otherwise, some of the analyses ARE NOT PERFORMED CORRECTLY."
>
> I have just told my class that BMDP has one of the best log-linear
> programs around. Now I wonder if that was bad advice.
Let's be fair. This is not an easy problem. The correct number of degrees of
freedom depends not only on the pattern of structural zeros, but on the model
being fitted to them. For details, see Savage IR (1973), "Incomplete
Contingency Tables: Conditions for the Existence of Unique MLE" in Jagars P
and Rade L eds. Mathematics and Statistics: Essays in Honour of Harald
Bergstrom. Goteborg, Sweden: (don't have the publisher. Sorry.)
For those who have not yet been exposed to the problem, consider fitting
a quasi-independence model to an r*c table, i.e., a model that specifies
row/column independence over a subset of the table (example, type of crime
against campus. If one of the crimes were auto theft, we would not expect
a homogeneity of proportions model to extend to those campuses where no cars
were allowed. For those campuses, structural 0's would be fitted to the
auto-theft cells and we might asks whether a model of homogeneity of
proportions fit the rest of the table.)
If only a few cells contain structural zeros, subtract 1 degree of freedom for
each structural 0. This will be incorrect if an entire row, say, contains
structural 0's because the rule of thumb gives (r-1)*(c-1)-c, whereas the
correct number of degrees of freedom is (r-2)*(c-1).
But it's just not as simple as checking for empty rows and columns. Consider
the 4 * 4 table (3*3=9 df) with structural zeros indicated by 0
. . 0 0
. . 0 0
0 0 . .
0 0 . .
The rule of thumb says that there is 1 df (9-8=1) but clearly there are 2--
one for each of the 2*2 tables. With multi-dimensional tables the problem gets
harder because, as I already mentioned, the correct number of df depends on not
just the pattern of structural zeros, but also on the model being fitted to
them.
Perhaps I'm being too pesimistic. It may take just one determined person to
look at Savage's results and turn them into usable code. It would make a nice
Applied Statistics algorithm if it could be written to be compatible with
Shelby Haberman's programs for analyzing multidimensional tables, also
published in Applied Statistics.
Technical Details
Message-ID:
<1992Oct30.135542.482@hnrc.tufts.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!ulowell!m2c!bu.edu!news.tufts.edu!news.hnrc.tufts.edu!jerryReferences:
<1992Oct29.223353.887@access.usask.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ulowell!m2c!bu.edu!news.tufts.edu!news.hnrc.tufts.edu!jerry From: jerry@hnrc.tufts.edu (Jerry Dallal) Newsgroups: sci.math.stat Subject: Re: Bug [or feature?] in BMDP 4F Message-ID: <1992Oct30.135542.482@hnrc.tufts.edu> Date: 30 Oct 92 18:55:41 GMT References: <1992Oct29.223353.887@access.usask.ca> Organization: USDA HNRC at Tufts University Lines: 59