Hello,
I would like to know how to estimate marginal effetcs after a GMNL model (Fiebig et al., 2010 / Gu et al., 2013), more precisely after a SGMNL model ?
The goal of the first model is to estimate the role of observed and unobserved heterogeneity on the individual choice about tap water, filtered water or bottled water. The second model includes residuals which are estimated in an ologit model. This model allows me to control the problem of endogenous attitudinal variables, here, satisfaction concerning tap water quality (Terza et al. 2008). My problem is that I don't know how to estimate marginal effects and how to predict probabilities.
Bellow, you'll find more informations about my two SGMNL models :
** Changes in the database to run GMNL */
gen gid = _n
expand 3
sort gid
label list choix
list choice age gender gid in 1/9, sepby(gid) nolab
by gid: gen temp = _n
gen eau = (temp==choice)
drop choice
rename temp choice
label define choice_r 1 "Bottled water" 2 "Filtered Water" 3 "Tap water"
label value choice choice_r
list choice eau age gender in 1/9, sepby(gid)
bysort gid: gen alter = _n
xi i.alter,noomit
gen alter_1=_Ialter_1 /* ASC */
gen alter_2=_Ialter_2 /* ASC */
gen alter_3=_Ialter_3 /* ASC */
xi i.r_satis_2,noomit
gen r_sat_1=_Ir_satis_2_1 /* Individual is not satisfied concerning tap water */
gen r_sat_2=_Ir_satis_2_2 /* Individual is satisfied concerning tap water */
gen r_sat_3=_Ir_satis_2_3 /* Individual is very satisfied concerning tap water */
forvalues i = 1/3 {
gen alterXage_`i' = alter_`i'*age
}
forvalues i = 1/3 {
forvalue j = 1/3 {
gen alterXr_sat_`i'`j' = alter_`i'*r_sat_`j'
}
}
/* Residuals estimated with ologit model */
forvalues i = 1/3 {
forvalue j = 1/3 {
gen alterXrs_`i'`j' = alter_`i'*rs`j'
}
}
matrix scale=0,0,1,1,1,1,1,1
xi:gmnl eau alter_1 alter_2 alterXage_1 alterXage_2 alterXr_sat_12 alterXr_sat_13 alterXr_sat_22 alterXr_sat_23, group(gid) id(id) het(i.gregion) scale(scale) diff
matrix scale=0,0,1,1,1,1,1,1,1,1,1,1
xi:gmnl eau alter_1 alter_2 alterXage_1 alterXage_2 alterXr_sat_12 alterXr_sat_13 alterXr_sat_22 alterXr_sat_23 alterXrs_12 alterXrs_13 alterXrs_22 alterXrs_23, group(gid) id(id) het(i.gregion) scale(scale) diff
Any and all input on this problem would be highly appreciated.
Regards,
Paul
I would like to know how to estimate marginal effetcs after a GMNL model (Fiebig et al., 2010 / Gu et al., 2013), more precisely after a SGMNL model ?
The goal of the first model is to estimate the role of observed and unobserved heterogeneity on the individual choice about tap water, filtered water or bottled water. The second model includes residuals which are estimated in an ologit model. This model allows me to control the problem of endogenous attitudinal variables, here, satisfaction concerning tap water quality (Terza et al. 2008). My problem is that I don't know how to estimate marginal effects and how to predict probabilities.
Bellow, you'll find more informations about my two SGMNL models :
** Changes in the database to run GMNL */
gen gid = _n
expand 3
sort gid
label list choix
list choice age gender gid in 1/9, sepby(gid) nolab
by gid: gen temp = _n
gen eau = (temp==choice)
drop choice
rename temp choice
label define choice_r 1 "Bottled water" 2 "Filtered Water" 3 "Tap water"
label value choice choice_r
list choice eau age gender in 1/9, sepby(gid)
bysort gid: gen alter = _n
xi i.alter,noomit
gen alter_1=_Ialter_1 /* ASC */
gen alter_2=_Ialter_2 /* ASC */
gen alter_3=_Ialter_3 /* ASC */
xi i.r_satis_2,noomit
gen r_sat_1=_Ir_satis_2_1 /* Individual is not satisfied concerning tap water */
gen r_sat_2=_Ir_satis_2_2 /* Individual is satisfied concerning tap water */
gen r_sat_3=_Ir_satis_2_3 /* Individual is very satisfied concerning tap water */
forvalues i = 1/3 {
gen alterXage_`i' = alter_`i'*age
}
forvalues i = 1/3 {
forvalue j = 1/3 {
gen alterXr_sat_`i'`j' = alter_`i'*r_sat_`j'
}
}
/* Residuals estimated with ologit model */
forvalues i = 1/3 {
forvalue j = 1/3 {
gen alterXrs_`i'`j' = alter_`i'*rs`j'
}
}
matrix scale=0,0,1,1,1,1,1,1
xi:gmnl eau alter_1 alter_2 alterXage_1 alterXage_2 alterXr_sat_12 alterXr_sat_13 alterXr_sat_22 alterXr_sat_23, group(gid) id(id) het(i.gregion) scale(scale) diff
matrix scale=0,0,1,1,1,1,1,1,1,1,1,1
xi:gmnl eau alter_1 alter_2 alterXage_1 alterXage_2 alterXr_sat_12 alterXr_sat_13 alterXr_sat_22 alterXr_sat_23 alterXrs_12 alterXrs_13 alterXrs_22 alterXrs_23, group(gid) id(id) het(i.gregion) scale(scale) diff
Any and all input on this problem would be highly appreciated.
Regards,
Paul