# [no subject]

```Joseph Coveney

--------------------------------------------------------------------------------

/* Examples of the Hauck-Donner Phenomenon
and the ability of the Huber-White-sandwich
variance estimator to help Wald tests to overcome it.

First example, from
http://www.math.yorku.ca/Who/Faculty/Monette/pub/s-98/0028.html
*/
clear
set more off
set obs 200
generate byte y = _n>_N/2
generate byte x = -15
replace x = -1 in 99
replace x = -1 in 101
replace x = 1 in 100
replace x = 1 in 102
replace x = 15 in 103/l
/*  The recommended approach to overcome the
sensitivity of the Wald test to this phenomenon
is to use a likelihood-ratio test or a Fisher-Rao
efficient score test (but see Douglas McManus's posting at
http://www.math.yorku.ca/Who/Faculty/Monette/S-news/0049.html)
. . . */
estimates store A
lrtest A ., stats
*  Well enough; however, with -robust- . . .
glm y x, family(binomial) link(logit) robust nolog
/*  Second example, from
http://maths.newcastle.edu.au/~rking/R/help/02b/3791.html
*/
clear
input byte pid byte x byte y byte z
1 8 7 1
2 8 3 1
3 0 5 0
4 0 9 0
5 8 1 1
end
glm z y x, family(binomial) link(logit)
estimates store A
glm z y, family(binomial) link(logit) nolog
lrtest A ., stats
* Again, . . .
glm z y x, family(binomial) link(logit) robust nolog
exit

--------------------------------------------------------------------------------

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```