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

Re: st: what the deal with mlogit predict?

From (Roberto G. Gutierrez, StataCorp)
Subject   Re: st: what the deal with mlogit predict?
Date   Tue, 12 Feb 2008 11:16:58 -0600

Kyle Hood <> has discovered a bug in -predict- after
-mlogit-.  He writes:

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

There is a bug in the -mlogit- predictor regarding how it is matching the
number of explicitly-stated variables to the number of model equations.  This
will be fixed in the next ado update.  As a temporary workaround, Kyle can use
wildcards, as Maarten Buis <> has already suggested:

    . predict s*, scores

will automatically generate the correct number of new variables.

*   For searches and help try:

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