On 13/11/2023 19:02, Allin Cottrell wrote:
Well, I think it might be expected, since the logit doc starts with
"If
the dependent variable is a binary variable (all values are 0 or 1)...".
But it's not intentional, nor (I think) desirable.
Now in git master, if a string-valued series has just two values, and
reduces to a straight dummy variable on subtracting 1 from its numeric
codes, we'll treat it as a binary case. Note that this is a special
dispensation for string-valued series, which much always have a minimum
numeric code of 1; we're not going to do this for regular numeric series
that have values 1 and 2 -- subtract 1, please!
This is very nice, thanks, Allin! I
guess that by the same logic we
could enable printing the value labels when we apply multinomial logit
to a string-valued series. Eg
<hansl>
# Replicate example in Wooldridge, table 15.2
set verbose off
open keane.gdt
stringify(status, defarray("School", "Neither", "Work"))
smpl (year==87) --restrict
logit status 0 educ exper expersq black --multinomial
</hansl>
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------