Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: -cmp- does not work properly - wrong installation?


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: -cmp- does not work properly - wrong installation?
Date   Fri, 20 Apr 2012 18:13:02 +0100

Try restarting Stata after installation. Otherwise look carefully for
(remnants of) previous versions on your system.

Nick

On Fri, Apr 20, 2012 at 12:42 PM, Laura R. <laura.roh@googlemail.com> wrote:
> Dear Stata users,
>
> I am using Stata version 11.1 to estimate models using the user-written
> -cmp-  (conditional mixed process) command . I installed the version from
> REPEC, and if I check with -ssc install cmp-, Stata says that the latest
> version is installed.
>
> After checking and trying out (and googling) a lot of things, I suspect that
> -cmp- is somehow not installed properly.
>
> But let me first give you an example:
>
> For example, I try to estimate the following model:
>
> *------------- begin example -----------
>
>
> set cmp
>
> cmp (y1= y2 x1 x2 x3 x4 x5)/*
> */ (y2= x4 x5 z1 z2 z3)/*
> */ if sample2==1,/*
> */ ind($cmp_oprobit $cmp_probit)
>
> *------------- end example -----------
> I receive the following error messages:
>
> For y1:
>
> *------------- begin error message -----------
>
> Warning: regressor matrix for _cmp_y1 equation appears
> ill-conditioned. (Condition number = 215.58099.)
> This might prevent convergence. If it does, and if you have not done
> so already, you may need to remove nearly collinear regressors to
> achieve convergence. Or you may need to add a nrtolerance(#) or
> nonrtolerance option to the command line.
> See cmp tips for more information.
>
> *------------- end error message -----------
>
> For y2:
>
> *------------- begin error message -----------
> Warning: regressor matrix for y2 equation appears ill-conditioned.
> (Condition number = 133.62972.)
> This might prevent convergence. If it does, and if you have not done
> so already, you may need to remove nearly
> collinear regressors to achieve convergence. Or you may need to add a
> nrtolerance(#) or nonrtolerance option to the command line. See cmp
> tips for more information.
>
> Fitting constants-only model for LR test of overall model fit.
>    cmp_lnL_continuous():  3204  matrix found where scalar required
>               cmp_lnL():     -  function returned error
>                 <istmt>:     -  function returned error
> Mata run-time error
> r(3204);
>
> *------------- end error message -----------
>
>
>  But I receive these messages any time I estimate any cmp-Models, even short
> ones like
>
> *------------- begin example -----------
>
> cmp (y1= x1 x2 x3), ind($cmp_oprobit)
>
> *------------- end example -----------
>
> I also tried to replicate Maarten Buis' example with a publicly available
> dataset:
> http://www.stata.com/statalist/archive/2011-02/msg01486.html
>
> I receive error messages after each model
>
> *------------- begin error message -----------
>
> Fitting constants-only model for LR test of overall model fit.
>     cmp_lnL_continuous():  3301  subscript invalid
>                cmp_lnL():     -  function returned error
>                  <istmt>:     -  function returned error
> Mata run-time error
> r(3301);
> *------------- end error message -----------
>
> And, after running through Maarten's dofile, I receive
>
> *------------- begin example with error message -----------
> lrtest a b
> estimation result a not found
> *------------- end example with error message -----------
>
> Now, if I type one model (without -quietly-) nothing happens.
>
> So: I always receive error messages, no matter which model and which data.
>
> Do you have any ideas what is wrong with my -cmp- command?

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index