Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Suest after asclogit - continued


From   "Pungkas B. Ali" <[email protected]>
To   <[email protected]>
Subject   st: Suest after asclogit - continued
Date   Mon, 8 Nov 2010 16:41:14 +1100

Hi All,

I run a McFadden's choice model using -asclogit- command in Stata 11. It
runs well as expected. Then I run -hausman- test of IIA which failed was
unsuccessful with this result:

---
Note: the rank of the differenced variance matrix (2) does not equal the
number of coefficients
        being tested (3); etc ... or there may be problems computing the
        test.  Examine the output of your estimators for anything unexpected
and possibly consider
        scaling your variables so that the coefficients are on a similar
scale
   ..etc
              Prob>chi2 =      1.0000
                (V_b-V_B is not positive definite)
---

So, I turn to -suest-: 
.suest full reduced 
number of score variables does not match number of equations in model full r
(198)

I knew this problem has been posted in this statalist a couple month ago by
Andreas Schmid <[email protected]> and so far has been
responded by Martin Weiss <[email protected]) (a copy is in the end of
this email). 

Just to make sure that I did the model and test correctly, I downloaded the
Cameron and Trivedi textbook example mus15data.dta
(http://www.stata-press.com/data/musr.html), and reshaping it into long
format) and did Martin's suggestion but resulted in the same error. ("number
of score variables does not match number of equations in model full r
(198)")

Then I used mus15datalong.dta (which has been reshaped to long format) form
the textbook and still give the similar message ("number of score variables
does not match number of equations in model full r (198)")

Did I miss-specify the model? Probably. But why did I get the same error
with the textbook example, as well? Does my Stata 11 need a tweak? 

Any help would be very appreciated. 

Pungkas ali

----
This is the copy from statalist 30 Jul 2010:

You may want to tell listers that your "standard textbook example" can be
found in the support material for the MUS book at
http://www.stata-press.com/data/musr.html

At the very least, you have to add the following lines to make the example
work:

*************
u mus15data.dta
generate id = _n
reshape long d p q, i(id) j(fishmode beach pier private charter) string

asclogit d p q, case(id) alternatives(fishmode) casevars(income)  ///
basealternative(beach) nolog
estimates store full
asclogit d p q if fishmode!="private", case(id) alternatives(fishmode)  ///
casevars(income) basealternative(beach) nolog
estimates store reduced
suest full reduced
*************

This is after you -cd-ed to the -dir- where the files by Cameron and Trivedi
reside...

HTH
Martin





*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index