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]

From |
William Buchanan <[email protected]> |

To |
"[email protected]" <[email protected]> |

Subject |
Re: st: Re: st: Re: st: Re: st: Re: st: Syntax of –cmp- for an ordered probit selection model |

Date |
Mon, 11 Nov 2013 06:33:08 -0600 |

It may be useful to use -set trace on- to find out exactly where things are breaking down in the code. If you don't want to dig too far into the code interpretation use -set tracedepth 1- before that (it will show only the higher level commands). Have you been able to reproduce this problem with other datasets that other users could use to replicate your issue? Sent from my iPhone > On Nov 11, 2013, at 5:54, <[email protected]> wrote: > > Dear Buchanan, > > Thank you so much for your reply. > I am sorry that I did not explain my question well. > > The model I am trying to estimate is > outcome equation: outcome_var =b1* var_list1 + u > selection equation: selection_var = b2*var_list2 + v > where outcome_var is a binomial variable, and selection_var is an ordered categorical variable (the categories are labeled from 1 to 7). > > Thus I use the command > cmp (outcome_var = var_list1) (selection_var = var_list2), ind(selection_var*$cmp_probit $cmp_oprobit) > which estimates the outcome equation with a probit model and the selection equation with an ordered probit model, but Stata keeps showing the error message “Indicator for outcome_var must only evaluate to integers between 0 and 8. r(198);” > > The exactly same command works well when I use other binary variables to be the selection variable, so I think that there may be some problem in the syntax > ind(selection_var*$cmp_probit $cmp_oprobit) > > Maybe the syntax should be write in another way when the selection variable is an ordered categorical variable? I try to figure out the correct syntax but failed. > > > >> --- On Mon, 2013/11/11, William Buchanan <[email protected]> wrote: >> >> If your outcome is binary why would you be using an ordered probit? And for clarity, I was asking about the outcome variable in any/all equations. >> >> Sent from my iPhone >> >>> On Nov 11, 2013, at 5:12, <[email protected]> wrote: >>> >>> Dear Buchanan, >>> >>> Thank you so much for your suggestion. >>> I check the data again, and all the data of the outcome variable is valued 0 or 1. >>> Do you think there may be any other possible problem? >>> >>> Kuo, Chiu-Wei >>> >>>> --- On Mon, 2013/11/11, William Buchanan <[email protected]> wrote: >>>> >>>> What are the values of your outcome variable? Are any of the values outside of the 0-8 range indicated by the error message? >>>> >>>> Sent from my iPhone >>>> >>>>> On Nov 11, 2013, at 4:53, <[email protected]> wrote: >>>>> >>>>> Dear Tamas, >>>>> >>>>> Thank you so much for the suggestion. >>>>> But the same error message still pops out when I put double quotes on the expression. >>>>> (while in the case where the selection variable is a binomial one, the command works well even without double quotes!) >>>>> >>>>> Do you think there may be any other problem of the syntax? >>>>> >>>>> Kuo, Chiu-Wei >>>>> >>>>>> --- On Mon, 2013/11/11, "Bartus Tamás" <[email protected]> wrote: >>>>>> >>>>>> Dear Kuo, >>>>>> >>>>>> Instead of >>>>>> >>>>>> ind(selection_var*$cmp_probit $cmp_oprobit) >>>>>> >>>>>> try >>>>>> >>>>>> ind("selection_var*$cmp_probit" $cmp_oprobit) >>>>>> >>>>>> Expressions appearing in the indicators option must be enlosed in double quotes >>>>>> >>>>>> Tamas >>>>>> >>>>>>> On 13/11/11, [email protected] wrote: >>>>>>> >>>>>>> >>>>>>> Dear all, >>>>>>> >>>>>>> I am trying to estimate the following selection model. >>>>>>> outcome equation: outcome_var =b1* var_list1 + u >>>>>>> selection equation: selection_var = b2*var_list2 + v >>>>>>> where outcome_var is a binomial variable, and selection_var is an ordered categorical variable. >>>>>>> >>>>>>> I use the command –cmp- (which can be obtained by –ssc cmp-) to estimate the model. My command is >>>>>>> cmp (outcome_var = var_list1) (selection_var = var_list2), ind(selection_var*$cmp_probit $cmp_oprobit) >>>>>>> However, the error message “Indicator for outcome_var must only evaluate to integers between 0 and 8. r(198);” keeps popping out. >>>>>>> >>>>>>> I found out that the same error massage appears whenever the selection variable is an ordered categorical variable, while it disappears and the command works normally when the selection variable is a binomial one. >>>>>>> >>>>>>> In the paper (“Estimating fully observed recursive mixed-process models with cmp”) written by the –cmp- writer, David Roodman, he mentioned that –cmp- is capable of doing the same estimation as –ssm- and –oheckman- do, so I think that –cmp- is the appropriate command for my model. >>>>>>> >>>>>>> I suppose that there is some problem with the part of the syntax, >>>>>>> ind(selection_var*$cmp_probit $cmp_oprobit) >>>>>>> I spent much time to figure out what the correct syntax is but still failed. >>>>>>> I really appreciate it if anyone can point out the problem of my syntax. >>>>>>> Thank you so much. >>>>>>> >>>>>>> Kuo, Chiu-Wei >>>>>>> >>>>>>> * >>>>>>> * For searches and help try: >>>>>>> * http://www.stata.com/help.cgi?search >>>>>>> * http://www.stata.com/support/faqs/resources/statalist-faq/ >>>>>>> * http://www.ats.ucla.edu/stat/stata/ >>>>>> >>>>>> -- >>>>>> >>>>>> Tamás Bartus, PhD >>>>>> Associate Professor, Deputy Director >>>>>> Institute of Sociology and Social Policy >>>>>> Program Director, Doctoral School of Sociology >>>>>> Corvinus University, Budapest >>>>>> 1093 Budapest, Közraktár utca 4-6. >>>>>> Room 424. >>>>>> Phone: +36-1-482-7301 >>>>>> Fax: +36-1-482-7348 >>>>>> Homepage: http://web.uni-corvinus.hu/bartus >>>>>> >>>>>> * >>>>>> * For searches and help try: >>>>>> * http://www.stata.com/help.cgi?search >>>>>> * http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:

**References**:

- Prev by Date:
**st: Re: st: Re: st: Re: st: Re: st: Syntax of –cmp- for an ordered probit selection model** - Next by Date:
**st: Conditional logistic regression** - Previous by thread:
**st: Re: st: Re: st: Re: st: Re: st: Syntax of –cmp- for an ordered probit selection model** - Next by thread:
**st: Re: st: Re: st: Re: st: Re: st: Re: st: Syntax of –cmp- for an ordered probit selection model** - Index(es):