My thanks to Joseph Coveney and David Airey for replying. I'll use Joseph's comments as a basis for a few more thoughts.
Joe says:
>> Your contrast statement doesn't specify the contrast that
>> you intended.
Clearly this was true if one confines that statement to Stata, however, both SAS and JMP interpreted a highly similar method of specifying the contrast as being what I intended. One can debate whether my intention was a reasonable intention but, assuming it was, Stata tested something else. My question from my first post, "Which is right?", still stands. Maybe a better question is, What do the two contrasts, the one I used and the one Joe proposes, really say? In Stata format, these would be:
lincom _coef[round[3]] - _coef[round[1]]
lincom _coef[round[3]] - _coef[round[1]] + _coef[size[1]] / 2
Or
test _coef[round[1]] = _coef[round[3]]
test _coef[round[1]] = _coef[round[3]] + _coef[size[1]] / 2
Joe also said:
>> First, I recommend to specify the ANOVA model as
>> anova nnn round size
>> which in this case happens to be equivalent to
>> -anova nn round size|round-,
>> but will give a clearer readout of what follows:
And then proceeded to use -lincom- to test the contrast:
>> anova, regress
>> With that in view, in order to get the correct contrast
>> (and the one that SAS and JMP report):
>> lincom _coef[round[3]] - _coef[round[1]] + _coef[size[1]] / 2
Interstingly, Joe use the phrase "correct contrast", but I think he really only meant the contrast that tests what appears to be what I intended.
My actual point in quoting the above revolves around the choice of specifying the model as -anova nnn round size- versus -anova nn round size|round- and the resulting impact on testing. As Joe says, the ANOVA estimates are the same (well, he doesn't say exactly that, but I think that is what he means by "equivalent"), however, it appears there is no way to specify the contrast based on nested model symbolism. That is, I was unable to find a way to symbolicly specify anything about -size|round- using that notation in either -test- or -lincom-. Alternatively, after the nested model (or the crossed model), one can specify:
test _b[round[1]] = _b[round[3]] + _b[size[1]*round[3]] / 2
Or
mat test13 = (0, 1, 0, -1, 0, 0, -.5, 0, 0, 0, 0, 0)
test, test(test13)
And the test will be performed. The first of these clearly resorts to crossed-model notation (even in the nested setup!).
My question: Is there a way to directly specify a nested term in -test- or -lincom- using nested notation (i.e., of the form: a|b)? If there is, I haven't found it.
Joe then mentions Milliken and Johnson:
>> Factorial ANOVA with missing cells is a real bear, and contrasts
>> after it is even worse. See Chapter 13 in George A. Milliken &
>> Dallas E. Johnson, _Analysis of Messy Data_ Volume 1: Designed
>> Experiments (London: Chapman & Hall, 1992).
I pulled the book off my shelf only to discover that I had (in a prior iteration through a similar problem, likely 10 years ago) highlighted essentially every key point concerning the issues underlying the differences above.
Clearly, in this model, SAS and JMP test a contrast on -round- of the form (1, 0, -1, 0, 0) differently than Stata does. That implicitly implies that the packages assume different things to make it testable. In Stata notation, SAS and JMP test contrast matrix (0, 1,0,-1,0,0, -.5,0,0,0,0,0) while Stata tests (0, 1,0,-1,0,0, 0,0,0,0,0,0) (i.e., exactly what I specified!). It also implies that the interpretation of those tests depend on those assumptions. I don't know what to say about that other than to be cautious!
Tom
CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s), contains information that may be confidential, protected by the attorney-client or other legal privileges, and/or proprietary non-public information. If you are not an intended recipient of this message or an authorized assistant to an intended recipient, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution, or reproduction of this message and/or any of its attachments (if any) by unintended recipients is not authorized and may be unlawful.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/