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]

Re: st: Cramer Ridder test for multinomial logit model - syntax error


From   Sangamitra Ramachander <sangamitra@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Cramer Ridder test for multinomial logit model - syntax error
Date   Sun, 21 Nov 2010 12:26:00 +0000

Tirthankar,

Re-opening Stata solved this. The test now works. Thank you very much
for your time and help, I really appreciate it!

Best,
Sangamitra

On Sun, Nov 21, 2010 at 12:17 PM, Tirthankar Chakravarty
<tirthankar.chakravarty@gmail.com> wrote:
> Sangamitra,
>
> Here is my output from running the above example:
>
> ************************************
> . crtest
>
> **** Cramer-Ridder test for combining outcome categories
>
> Ho: Candidates for pooling have the same regressor coefficients
>    apart from the intercept
>
>                       ln L     ln Lr        LR    P>chi2
>  Indemnit:Prepaid  -534.362  -549.988    31.252     0.000
> Indemnit:Uninsure  -534.362  -539.756    10.790     0.056
>  Prepaid:Uninsure  -534.362  -542.431    16.139     0.006
>
> degrees of freedom for chi-square distribution:  5
> ************************************
>
> Please ensure that your edited and saved version of -crtest- is being
> called by Stata. You can check by typing:
> . viewsource crtest.ado
>  and looking for the changes you made. Make sure all instances of
> "e(k_cat)" have been replaced.
>
> You should also try closing and restarting Stata and then check if it
> works. If all else fails, I will send you my edited version of the
> "crtest.ado" file off-list which should work.
>
> T
>
> 2010/11/21 Sangamitra Ramachander <sangamitra@gmail.com>:
>> Tirthankar,
>>
>> Thanks very much. I got the ado file from the same source that you
>> mention below:
>>
>> *! version 1.2 (25 November 2003)               Joao Pedro Wagner de Azevedo
>>
>> I tried what you have suggested: changed all instances of "e(k_cat)"
>> to "e(k_out)" on the ado file, but I get the same invalid syntax
>> error. I'm not sure if this should be implemented in a specific way
>> other than manually, which is what I tried. Thanks again.
>>
>> Best,
>> Sangamitra
>>
>>
>> On Sun, Nov 21, 2010 at 10:22 AM, Tirthankar Chakravarty
>> <tirthankar.chakravarty@gmail.com> wrote:
>>> Sangamitra,
>>>
>>> You need to tell the list where you get user-written ado-files from. In my case:
>>> . ssc install crtest
>>> . which crtest
>>> <output omitted>
>>> *! version 1.2 (25 November 2003)               Joao Pedro Wagner de Azevedo
>>>
>>> This routine will not work with a fully updated Stata 10.1 because the
>>> scalars returned by -mlogit- have been renamed since Stata 8 (my
>>> guess), viz., the number of categories used to be returned in
>>> "e(k_cat)", but is now returned in "e(k_out)". So you need to change
>>> all instances of the occurrence of "e(k_cat)" in the file "crtest.ado"
>>> to "e(k_out)" (on line #s 28, 43, 44 and 81). Then, as in the
>>> following example, -crtest- should work fine:
>>>
>>> *********************************************
>>> webuse sysdsn3, clear
>>> mlogit insure age male nonwhite site2 site3
>>> crtest
>>> *********************************************
>>>
>>> T
>>>
>>> On Sun, Nov 21, 2010 at 1:42 AM, Sangamitra Ramachander
>>> <sangamitra@gmail.com> wrote:
>>>>
>>>> Dear All,
>>>>
>>>> I'm trying to use the Cramer Ridder test to see whether I can combine
>>>> two of the categories used in a multinomial logit model.
>>>>
>>>> I have used this test in the past with an old version of stata (Stata
>>>> 8). I am now using Stata 10 and have looked at the help and it says
>>>> the command is, after the mlogit, 'crtest' - this should tell you
>>>> pairwise whether categories are different.
>>>>
>>>> However, when I do this, I get an invalid syntax error. I am not sure
>>>> if this test ceases to work in subsequent versions of stata or if I
>>>> should be doing something different. I've updated my version of Stata
>>>> 10 and downloaded the ado file for this test.
>>>>
>>>> I've scanned the archives of this list but wasn't able to find a
>>>> similar discussion. Any help would be very much appreciated! Thank you
>>>> very much.
>>>>
>>>> Best,
>>>> Sangamitra
>>>> *
>>>> *   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/
>>>
>>>
>>>
>>> --
>>> To every ω-consistent recursive class κ of formulae there correspond
>>> recursive class signs r, such that neither v Gen r nor Neg(v Gen r)
>>> belongs to Flg(κ) (where v is the free variable of r).
>>>
>>> *
>>> *   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/
>>>
>>
>> *
>> *   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/
>>
>
>
>
> --
> To every ω-consistent recursive class κ of formulae there correspond
> recursive class signs r, such that neither v Gen r nor Neg(v Gen r)
> belongs to Flg(κ) (where v is the free variable of r).
>
> *
> *   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/
>

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