On Wed, 3 Jul 2019, Fazeel Jaleel wrote:
Hello,
Can someone please explain ,
1.how to change the reference category in multinomial logic estimation in Gretl
2. And, how to obtain estimates for each category for an explanatory variable that has 4
categories.
At present, the "logit" command doesn't have an option for choosing the
reference category when estimating the multinomial model; the reference
category is always the lowest value. However, you can use the "recode"
function to redefine the dependent variable to make the reference category
the one you want. Once estimation is done, the fitted probvabilities for
each category can be recovered via the "$mnlprobs" accessor.
All this is exemplified in the script below:
<hansl>
# Replicate the multinomial logit example from Table 15.2 in
# Wooldridge's panel data book (2002a).
open keane.gdt
smpl (year==87) --restrict
list X = 0 educ exper expersq black
logit status X --multinomial
# change reference category
status2 = replace(status, {1,2}, {2,1})
xtab status status2
logit status2 X --multinomial
# retrieve fitted probabilities
matrix P = $mnlprobs
print P --range=1:10
</hansl>
Hope this helps!
-------------------------------------------------------
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
-------------------------------------------------------