Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: what the deal with mlogit predict?


From   "Sergiy Radyakin" <[email protected]>
To   [email protected]
Subject   Re: st: what the deal with mlogit predict?
Date   Tue, 12 Feb 2008 11:30:54 -0500

Shouldn't this:

capture noisily error cond(`nvars'<e(k_cat), 102, 103)

be

capture noisily error cond(`nvars'<e(k_cat)-1, 102, 103)
??

Number of variables must be equal to number of different categories minus 1.

Regards, Sergiy



On 2/12/08, Maarten buis <[email protected]> wrote:
> That is odd, you can still get the scores by typing:
> predict s*, scores
>
> -- Maarten
>
> --- Kyle Hood <[email protected]> wrote:
>
> > I am trying to do predictions of scores with mlogits, and I get some
> > strange errors.  Using Stata 10.  Here is an example.
> >
> > . webuse sysdsn3
> >
> > . mlogit insure age male nonwhite site2 site3
> > * results suppressed *
> >
> > . predict s1 s2 s3, scores
> > too many variables specified
> > the current estimation results for mlogit have 2 equations so you
> > must
> > specify 2 new variables, or you can use the
> > equation() option and specify one variable at a time
> > r(103);
> >
> > . predict s1 s2, scores
> > too few variables specified
> > insure has 3 outcomes and so you must specify 3 new variables, or
> > you can use the outcome() option and specify variables one at a time
> > r(102);
> >
> > How can 3 be too many but 2 too few?  What am I missing, here?
> >
> > Kyle
> > *
> > *   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/
> >
>
>
> -----------------------------------------
> Maarten L. Buis
> Department of Social Research Methodology
> Vrije Universiteit Amsterdam
> Boelelaan 1081
> 1081 HV Amsterdam
> The Netherlands
>
> visiting address:
> Buitenveldertselaan 3 (Metropolitan), room Z434
>
> +31 20 5986715
>
> http://home.fsw.vu.nl/m.buis/
> -----------------------------------------
>
>
>      __________________________________________________________
> Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com
>
> *
> *   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/
>
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index