[R] [Fwd: Re: st: Multinomial logistic regression under R and Stata]

Tak Wing Chan tw.chan at sociology.oxford.ac.uk
Fri Mar 28 18:16:57 CET 2003


  Hello

Following Professor Ripley's suggestion, I've posted my query to the 
Stata list as well. So far, I have one reply from that list, which I am 
forwarding for your reference.

Many thanks to colleagues for your replies. I will follow up and check 
out your suggestions, and report back in due course.

Cheers.  Wing

-------- Original Message --------
Subject: Re: st: Multinomial logistic regression under R and Stata
Date: Sat, 29 Mar 2003 01:35:01 +0900
From: Joseph Coveney <jcoveney at bigplanet.com>
Reply-To: statalist at hsphsun2.harvard.edu
To: Statalist <statalist at hsphsun2.harvard.edu>



Tak Wing Chan found some differences in the standard errors of ceratin parameter 
estimates for a particular multinomial logistic model fitted by -mlogit- and by the 
corresponding command in R.  

As Scott Merryman pointed out in, Brian Ripley, posting on the R Help list in response 
to Tak Wing's posting about the discrepancies, mentioned that the Hauck-Donner 
Phenomenon, which I had never heard of, is among the possibilities for an explanation 
of the discrepancies between Stata and R:  "R uses the observed information matrix for 
the standard errors.  It is also possible to use the expected (Fisher) information matrix.  
Where they differ, the observed one is generally regarded as a better choice, especially 
when as here the curvature is measured over a reasonably-sized neighbourhood.  . . . 
such differences can [also] be caused by the Hauck-Donner effect and lack of 
convergence, so it is almost always worth playing with the convergence criteria."

I'm not certain that it matters, if I'm not mistaken, since the canonical link is used, but I 
believe that Stata uses the observed information matrix by default with -mlogit-, 
anyway.  So that doesn't appear to be the root of the problem.  If the likelihood-
maximization methods and convergence criteria are similar (and these can be 
checked), then that leaves the "Hauck-Donner effect" as a suspect.

>From some preliminary probing that is illustrated in the do-file below, it seems that any 
culpability of the Hauck-Donner Phenomenon can be ascertained by invoking the 
-robust- option in Stata.  Although it won't be necessary to cross-check it in R in order to 
rule out the possibility, it is very likely for it to be possible for Tak Wing to do so, since I 
would wager that R has an analogous option for the Huber-White-sandwich variance 
estimator with its multinomial logistic regression command.

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
glm y x, family(binomial) link(logit)
/*  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
glm y, family(binomial) link(logit) nolog
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/




-- 
Department of Sociology, University of Oxford,
Littlegate House, St Ebbes, Oxford OX1 1PT, UK
tel: +44 (1865) 286176, fax: +44 (1865) 286171
http://users.ox.ac.uk/~sfos0006



More information about the R-help mailing list