From melanie.velarde at uni-osnabrueck.de Thu Jun 8 19:56:43 2017 From: melanie.velarde at uni-osnabrueck.de (Melanie Velarde) Date: Thu, 8 Jun 2017 09:56:43 +0000 Subject: [Limdep Nlogit List] Multinomial Multiperiod Probit Model Message-ID: Dear Mr. Greene, thank you so much for your suggestions regarding my problem with a multinomial multiperiod probit model! Yesterday I gave a try to your suggestion of selecting (for purpose of getting started) households that all have the same number of waves. However, I was not entirely able to solve my problem. Here?s what happened: 1) I started my session in Nlogit by choosing only those households that participated in all 6 survey waves (below is an example of what my data looks like) REJECT ; NWAVES <6 $ WAVE NWAVES CSET ALTI CHOICE DCE 1 6 3 1 1 22 1 6 3 2 0 22 1 6 3 3 0 22 . . . . . . . . . . . . . . . . . . 6 6 3 1 0 82 6 6 3 2 1 82 6 6 3 3 0 82 Therewith I tried to estimate my multinomial multiperiod probit model as follows: SORT ; Lhs = HNR ; Rhs = * $ CREATE ; GRPID = Seq(HNR) $ SETPANEL ; Group = GRPID $ MNPROBIT ;Lhs = CHOICE, CSET, ALTI ;Choices = A, B, C ;Model: U(B)= BALPHA + BDCE*DCE / U(C)= CALPHA + CDCE*DCE ;Pds = 6 $ This procedure was followed by this message: WARNING: Bad observations were found in the sample. Found 1728 bad observations among 1728 individuals. Etc. Error 1098: Unusable LHS variable in choice model setup 2) Because that didn?t end well, I tried out something else and something curious happened... I specified a multinomial probit model using households that participated only once (irrespective of the wave of participation) and aborted the iteration process. Right after that I again chose only those households that participated in all 6 survey waves and therewith I again tried to estimate my multinomial multiperiod probit model as specified above. Only this time, Nlogit actually started working but ended the iteration process because the estimated variance matrix of estimates is singular (I tried the very same procedure a little earlier and that time the iteration process was ended because my model was too complex). I wonder how it is possible that Nlogit at some times manages to at least start estimating a multiperiod multinomial probit model for a balanced panel, while at other times not? Did I forget to specify something very essential? I just can?t figure out what could be missing? Again, thanks a lot for your help in advance!!! Best regards, Melanie Velarde Wissenschaftliche Mitarbeiterin Fachgebiet ?konometrie und Statistik Fachbereich Wirtschaftswissenschaften Universit?t Osnabr?ck Rolandstr. 8 49069 Osnabr?ck Tel.: + 49 541 9692756 E-Mail: melanie.velarde at uni-osnabrueck.de From kameyama.hiroshi at gmail.com Sun Jun 11 18:54:25 2017 From: kameyama.hiroshi at gmail.com (Hiro Kame) Date: Sun, 11 Jun 2017 17:54:25 +0900 Subject: [Limdep Nlogit List] Random Utility Model Message-ID: Greeting, Having looked at Prog. Greene's short course materials for multinomial model, where multinomial logit, nested logit, mixed logit model are explained as gradually expanded to mixed logit model. I can not clearly explain the following question. Q1: Can we say, multinomial logit model based on random utility model? Q2: Other name of mixed logit model, random parameter logit model, what is randomized in the estimation process? Thank you in advance. ???????????????????????? KAMEYAMA, Hiroshi Rural Management, Faculty of Agriculture Kagawa University, Japan 761-0795 From david.hensher at sydney.edu.au Sun Jun 11 19:02:58 2017 From: david.hensher at sydney.edu.au (David Hensher) Date: Sun, 11 Jun 2017 09:02:58 +0000 Subject: [Limdep Nlogit List] Random Utility Model In-Reply-To: References: Message-ID: The MNL model is formally derived within the setting of random utility maximisation. This is standard derivation - unobserved influences create RUM cf Deterministic UM. As regards Mixed logit or random parameter logit, the randomness is associated with the distribution of the parameters across the sample to capture preference heterogeneity. Random also relates to fact that there is no systematic source to guide location on the distribution of each sampled observation so results are population based and not to a specific individual. See many sources such as Hensher, Rose and Greene Applied Choice analysis (Cambridge) 2005 and 2015. Sent from my iPhone 0418 433 057 David A Hensher Note: do not use hgroup at optusnet.com.au from now on, and instead use hgroup at hensher.com.au or David.hensher at bigpond.com.au or David.hensher at sydney.edu.au These emails are linked so use one only > On 11 Jun 2017, at 6:56 pm, Hiro Kame wrote: > > Greeting, > > Having looked at Prog. Greene's short course materials for multinomial > model, > where multinomial logit, nested logit, mixed logit model are explained as > gradually expanded to mixed logit model. > > I can not clearly explain the following question. > Q1: Can we say, multinomial logit model based on random utility model? > Q2: Other name of mixed logit model, random parameter logit model, what is > randomized in the estimation process? > > Thank you in advance. > > ???????????????????????? > KAMEYAMA, Hiroshi > Rural Management, Faculty of Agriculture > Kagawa University, Japan 761-0795 > _______________________________________________ > Limdep site list > Limdep at limdep.itls.usyd.edu.au > http://limdep.itls.usyd.edu.au From kameyama.hiroshi at gmail.com Sun Jun 11 22:16:05 2017 From: kameyama.hiroshi at gmail.com (Hiro Kame) Date: Sun, 11 Jun 2017 21:16:05 +0900 Subject: [Limdep Nlogit List] Random Utility Model In-Reply-To: References: Message-ID: Great thanks to Prof. Hensher. Kameyama From djourdain at ait.asia Mon Jun 12 13:18:26 2017 From: djourdain at ait.asia (Damien Jourdain) Date: Mon, 12 Jun 2017 10:18:26 +0700 Subject: [Limdep Nlogit List] Test if blocks in the design created a bias. Message-ID: <001b01d2e32a$90472940$b0d57bc0$@cirad.fr> Dear all, We have conducted a discrete choice experiment using a D-efficient design with 18 scenarios. As we were concerned that 18 scenarios would create too much burden for respondents, we decided to create 3 blocks of 6 scenarios. The population of the 3 blocks were chosen to be as similar as possible, but since not all people received the same scenarios, we would like to test whether we haven't created a bias. It is an unlabeled experiment with one status quo option. We have introduced a dummy variable ASC (1 when SQ, 0 other alternative), and two dummy variables for block2 and block3. We want to test that blocks did not introduce some bias, so we are testing the interactions of blocks with the ASC variable (as we would test the influence of socio-economic variables) ? MNL Model NLOGIT; ; Choices = 1,2,3 ; Lhs = choice ; Rhs = asc, asc*block2, asc*block3 , prim, wbird, iweed, fecos $ If the coefficient associated to asc*block1 and asc*block2 are not significantly different from zero, can we say that the block did not introduce biases? Or should we use another test? Would this formulation still work if we were using effect coding for both ASC and block2 and block3? Best, Damien Dr. Damien Jourdain Agricultural and Natural Resources Economist Visiting Assistant Professor Asian Institute of Technology / CIRAD G-EAU Natural Resource Management / Water Engineering and Management mail: djourdain at ait.asia web GEAU : www.g-eau.net web NRM : www.nrm.ait.asia From brett.smith at uwa.edu.au Mon Jun 12 13:45:04 2017 From: brett.smith at uwa.edu.au (Brett Smith) Date: Mon, 12 Jun 2017 11:45:04 +0800 Subject: [Limdep Nlogit List] Test if blocks in the design created a bias. In-Reply-To: <001b01d2e32a$90472940$b0d57bc0$@cirad.fr> References: <001b01d2e32a$90472940$b0d57bc0$@cirad.fr> Message-ID: <4426D481DD196F4898C7C52CFC4C7D62016AA9FFD9CF@IS-WIN-384.staffad.uwa.edu.au> Hi Damien, The alternate specific constants relate to the alternatives 1,2,3 and as these are unlabelled alternatives the ASC should not differ from zero (no matter which block the respondent answered). Perhaps you may look at the taste parameters. One possibility is to use the panel specification and to set the parameters to random (I am not sure how many responses you have so you may want to be cautious). Interact the R.P. with choice blocks 2 and 3. If the location of the mean parameter estimates differ from zero then that is an indicator that there is a design effect in your data. All the best, Brett -----Original Message----- From: limdep-bounces at limdep.itls.usyd.edu.au [mailto:limdep-bounces at limdep.itls.usyd.edu.au] On Behalf Of Damien Jourdain Sent: Monday, 12 June 2017 11:18 AM To: limdep at limdep.itls.usyd.edu.au Subject: [Limdep Nlogit List] Test if blocks in the design created a bias. Dear all, We have conducted a discrete choice experiment using a D-efficient design with 18 scenarios. As we were concerned that 18 scenarios would create too much burden for respondents, we decided to create 3 blocks of 6 scenarios. The population of the 3 blocks were chosen to be as similar as possible, but since not all people received the same scenarios, we would like to test whether we haven't created a bias. It is an unlabeled experiment with one status quo option. We have introduced a dummy variable ASC (1 when SQ, 0 other alternative), and two dummy variables for block2 and block3. We want to test that blocks did not introduce some bias, so we are testing the interactions of blocks with the ASC variable (as we would test the influence of socio-economic variables) ? MNL Model NLOGIT; ; Choices = 1,2,3 ; Lhs = choice ; Rhs = asc, asc*block2, asc*block3 , prim, wbird, iweed, fecos $ If the coefficient associated to asc*block1 and asc*block2 are not significantly different from zero, can we say that the block did not introduce biases? Or should we use another test? Would this formulation still work if we were using effect coding for both ASC and block2 and block3? Best, Damien Dr. Damien Jourdain Agricultural and Natural Resources Economist Visiting Assistant Professor Asian Institute of Technology / CIRAD G-EAU Natural Resource Management / Water Engineering and Management mail: djourdain at ait.asia web GEAU : www.g-eau.net web NRM : www.nrm.ait.asia _______________________________________________ Limdep site list Limdep at limdep.itls.usyd.edu.au http://limdep.itls.usyd.edu.au From gutamajale at gmail.com Fri Jun 16 07:25:47 2017 From: gutamajale at gmail.com (S Tarfasa) Date: Thu, 15 Jun 2017 17:25:47 -0400 Subject: [Limdep Nlogit List] Simple Mixed Logit Message-ID: Can anyone help me whether or not simple versus general Mixed Logit model exists? Any help is greatly appreciated. Solomon Tarfasa Assistant professor Virus-free. www.avast.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> From djourdain at ait.asia Wed Jun 21 14:22:17 2017 From: djourdain at ait.asia (Damien Jourdain) Date: Wed, 21 Jun 2017 11:22:17 +0700 Subject: [Limdep Nlogit List] Heuristics & latent classes using Maximize in nlogit 5. How can I take into account the quasi-panel structure of experiment? Message-ID: <008901d2ea45$f9217c50$eb6474f0$@cirad.fr> Dear List members, Sorry for the long message, but this is to describe the different steps before reaching my problem! We are analyzing a choice experiment using Nlogit5. ? MNL Model NLOGIT; ; Choices = 1,2,3 ; Lhs = Choice ; Rhs = SQ , BEN10, LAB10, CAS10, RISK10, ST, FERTHI, FERTLO $ During the interviews, we had noticed that many respondents tended to eliminate the alternative when FERTLO = 1 and FERTHI = 0 (in fact FERT is a nominal variable that we effect coded into FERTLO and FERTHI), we would like to test whether the heuristic is present in the population. I have looked at the Hensher et al. 2015, Applied choice analysis book and came out with the following procedures. (but I am using Nlogit 5 so far) First I checked that I could use Maximize to reproduce the simple MNL. Sample; All$ create; ch0 = Choice; ch1 = Choice[+1]; ch2 = Choice[+2]$ create; ben0 = ben10; ben1 = ben10[+1]; ben2 = ben10[+2]$ create; lab0 = lab10; lab1 = lab10[+1]; lab2 = lab10[+2]$ create; cas0 = cas10; cas1 = cas10[+1]; cas2 = cas10[+2]$ create; sto0 = st; sto1 = st[+1]; sto2 = st[+2]$ create; fhi0 = ferthi; fhi1 = ferthi[+1]; fhi2 = ferthi[+2]$ create; flo0 = fertlo; flo1 = fertlo[+1]; flo2 = fertlo[+2]$ create; J = Trn(-3, 0)$ reject; J > 1$ Namelist; x0 = ben0, lab0, cas0, sto0, fhi0, flo0; x1 = ben1, lab1, cas1, sto1, fhi1, flo1; x2 = ben2, lab2, cas2, sto2, fhi2, flo2 $ Calc; ks = Col(x0)$ Matrix; cs = init(ks,1,0.1) $ Maximize ; labels = interc, ks_bs ; start = 0.1, cs ; maxit = 30 ; Fcn = ut0 = interc+ bs1'x0 | v0 = exp(ut0) | ut1 = bs1'x1 | v1 = exp(ut1) | ut2 = bs1'x2 |v2 = exp(ut2) | IV = v0+ v1 + v2 | P = ( ch0*v0 + ch1*v1 + ch2*v2)/ IV | log(P) ; Output=1$ It gave the same results. Then I produced an Indicator variable (being equal to zero when the fertlo is present. It helps me modify the utility functions so that the utility of one alternative is equal to zero when the attribute is present. create; I1=1$ create; I2=1$ create; if(flo1=1 & fhi1= 0)I1=0$ create; if(flo2=1 & fhi2= 0)I2=0$ Maximize ; labels = intercep, ks_bs ; start = 0.1, cs ? ; maxit = 30 ; Fcn = ut0 = intercep+ bs1'x0 | v0 = exp(ut0) | ut1 = I1 * (bs1'x1) | ? the utility is becoming null when the fertlo indicator is present in the alternative v1 = exp(ut1) | ut2 = I2*(bs1'x2) | v2 = exp(ut2) | IV = v0+ v1 + v2 | P = ( ch0*v0 + ch1*v1 + ch2*v2)/ IV | log(P) ; Output=1$ Finally I am trying to develop a latent class analysis so that I can identify whether the two types of heuristics are present in the sample. ? Latent class analysis Calc; ks2 = Col(x0)$ Matrix; cs2 = init(ks2,1,0.1) $ Maximize ; labels = inter, ks_ba, inter2, ks2_bb, gamma ; start = 0.1, cs, 0.1, cs2, 0.1 ; maxit = 30 ; Fcn = ut0c1 = inter+ ba1'x0 | v0c1 = exp(ut0c1) | ut1c1 = ba1'x1 |v1c1 = exp(ut1c1) | ut2c1 = ba1'x2 |v2c1 = exp(ut2c1) | IVc1 = v0c1+ v1c1 + v2c1 | Pc1 = ( ch0*v0c1 + ch1*v1c1 + ch2*v2c1)/ IVc1 | ut0c2 = inter2+ bb1'x0 | v0c2 = exp(ut0c2) | ut1c2 = I1 * (bb1'x1) | v1c2 = exp(ut1c2) | ut2c2 = I2*(bb1'x2) | v2c2 = exp(ut2c2) | IVc2 = v0c2+ v1c2 + v2c2 | Pc2 = ( ch0*v0c2 + ch1*v1c2 + ch2*v2c2)/ IVc2 | Pprob = 1 / (1+exp(gamma))| P = Pprob * Pc1 + (1-Pprob) * Pc2 | log(P) ; Output=1$ While the model is running ok, I realize that I am not taking into account the fact that respondents are actually answering 6 choice sets (quasi-panel?), but I cannot find a meaningful way to write that using Maximize ? Anybody already faced this kind of issue? Best, Damien Dr. Damien Jourdain Agricultural and Natural Resources Economist Visiting Assistant Professor Asian Institute of Technology / CIRAD G-EAU Natural Resource Management / Water Engineering and Management mail: djourdain at ait.asia web GEAU : www.g-eau.net web NRM : www.nrm.ait.asia From melanie.velarde at uni-osnabrueck.de Thu Jun 22 16:35:50 2017 From: melanie.velarde at uni-osnabrueck.de (Melanie Velarde) Date: Thu, 22 Jun 2017 06:35:50 +0000 Subject: [Limdep Nlogit List] Heuristics & latent classes using Maximize in nlogit 5. How can I take into account the quasi-panel structure of experiment? In-Reply-To: <008901d2ea45$f9217c50$eb6474f0$@cirad.fr> References: <008901d2ea45$f9217c50$eb6474f0$@cirad.fr> Message-ID: <42db7dcd6a6e4ff89c4bf4303c176bbd@fb9exmb2.fb9.uni-osnabrueck.de> Dear Damien, I cannot answer your question, sorry... But I noticed that you're missing a constant in your model specification, which I find unusual... Just wanted to point that out, in case that didn't happen on purpose. Best regards, Melanie Velarde -----Urspr?ngliche Nachricht----- Von: limdep-bounces at limdep.itls.usyd.edu.au [mailto:limdep-bounces at limdep.itls.usyd.edu.au] Im Auftrag von Damien Jourdain Gesendet: Mittwoch, 21. Juni 2017 06:22 An: limdep at limdep.itls.usyd.edu.au Betreff: [Limdep Nlogit List] Heuristics & latent classes using Maximize in nlogit 5. How can I take into account the quasi-panel structure of experiment? Dear List members, Sorry for the long message, but this is to describe the different steps before reaching my problem! We are analyzing a choice experiment using Nlogit5. ? MNL Model NLOGIT; ; Choices = 1,2,3 ; Lhs = Choice ; Rhs = SQ , BEN10, LAB10, CAS10, RISK10, ST, FERTHI, FERTLO $ During the interviews, we had noticed that many respondents tended to eliminate the alternative when FERTLO = 1 and FERTHI = 0 (in fact FERT is a nominal variable that we effect coded into FERTLO and FERTHI), we would like to test whether the heuristic is present in the population. I have looked at the Hensher et al. 2015, Applied choice analysis book and came out with the following procedures. (but I am using Nlogit 5 so far) First I checked that I could use Maximize to reproduce the simple MNL. Sample; All$ create; ch0 = Choice; ch1 = Choice[+1]; ch2 = Choice[+2]$ create; ben0 = ben10; ben1 = ben10[+1]; ben2 = ben10[+2]$ create; lab0 = lab10; lab1 = lab10[+1]; lab2 = lab10[+2]$ create; cas0 = cas10; cas1 = cas10[+1]; cas2 = cas10[+2]$ create; sto0 = st; sto1 = st[+1]; sto2 = st[+2]$ create; fhi0 = ferthi; fhi1 = ferthi[+1]; fhi2 = ferthi[+2]$ create; flo0 = fertlo; flo1 = fertlo[+1]; flo2 = fertlo[+2]$ create; J = Trn(-3, 0)$ reject; J > 1$ Namelist; x0 = ben0, lab0, cas0, sto0, fhi0, flo0; x1 = ben1, lab1, cas1, sto1, fhi1, flo1; x2 = ben2, lab2, cas2, sto2, fhi2, flo2 $ Calc; ks = Col(x0)$ Matrix; cs = init(ks,1,0.1) $ Maximize ; labels = interc, ks_bs ; start = 0.1, cs ; maxit = 30 ; Fcn = ut0 = interc+ bs1'x0 | v0 = exp(ut0) | ut1 = bs1'x1 | v1 = exp(ut1) | ut2 = bs1'x2 |v2 = exp(ut2) | IV = v0+ v1 + v2 | P = ( ch0*v0 + ch1*v1 + ch2*v2)/ IV | log(P) ; Output=1$ It gave the same results. Then I produced an Indicator variable (being equal to zero when the fertlo is present. It helps me modify the utility functions so that the utility of one alternative is equal to zero when the attribute is present. create; I1=1$ create; I2=1$ create; if(flo1=1 & fhi1= 0)I1=0$ create; if(flo2=1 & fhi2= 0)I2=0$ Maximize ; labels = intercep, ks_bs ; start = 0.1, cs ? ; maxit = 30 ; Fcn = ut0 = intercep+ bs1'x0 | v0 = exp(ut0) | ut1 = I1 * (bs1'x1) | ? the utility is becoming null when the fertlo indicator is present in the alternative v1 = exp(ut1) | ut2 = I2*(bs1'x2) | v2 = exp(ut2) | IV = v0+ v1 + v2 | P = ( ch0*v0 + ch1*v1 + ch2*v2)/ IV | log(P) ; Output=1$ Finally I am trying to develop a latent class analysis so that I can identify whether the two types of heuristics are present in the sample. ? Latent class analysis Calc; ks2 = Col(x0)$ Matrix; cs2 = init(ks2,1,0.1) $ Maximize ; labels = inter, ks_ba, inter2, ks2_bb, gamma ; start = 0.1, cs, 0.1, cs2, 0.1 ; maxit = 30 ; Fcn = ut0c1 = inter+ ba1'x0 | v0c1 = exp(ut0c1) | ut1c1 = ba1'x1 |v1c1 = exp(ut1c1) | ut2c1 = ba1'x2 |v2c1 = exp(ut2c1) | IVc1 = v0c1+ v1c1 + v2c1 | Pc1 = ( ch0*v0c1 + ch1*v1c1 + ch2*v2c1)/ IVc1 | ut0c2 = inter2+ bb1'x0 | v0c2 = exp(ut0c2) | ut1c2 = I1 * (bb1'x1) | v1c2 = exp(ut1c2) | ut2c2 = I2*(bb1'x2) | v2c2 = exp(ut2c2) | IVc2 = v0c2+ v1c2 + v2c2 | Pc2 = ( ch0*v0c2 + ch1*v1c2 + ch2*v2c2)/ IVc2 | Pprob = 1 / (1+exp(gamma))| P = Pprob * Pc1 + (1-Pprob) * Pc2 | log(P) ; Output=1$ While the model is running ok, I realize that I am not taking into account the fact that respondents are actually answering 6 choice sets (quasi-panel?), but I cannot find a meaningful way to write that using Maximize ? Anybody already faced this kind of issue? Best, Damien Dr. Damien Jourdain Agricultural and Natural Resources Economist Visiting Assistant Professor Asian Institute of Technology / CIRAD G-EAU Natural Resource Management / Water Engineering and Management mail: djourdain at ait.asia web GEAU : www.g-eau.net web NRM : www.nrm.ait.asia _______________________________________________ Limdep site list Limdep at limdep.itls.usyd.edu.au http://limdep.itls.usyd.edu.au From djourdain at ait.asia Thu Jun 22 19:31:34 2017 From: djourdain at ait.asia (Damien Jourdain) Date: Thu, 22 Jun 2017 16:31:34 +0700 Subject: [Limdep Nlogit List] Heuristics & latent classes using Maximize in nlogit 5. How can I take into account the quasi-panel structure of experiment? In-Reply-To: <42db7dcd6a6e4ff89c4bf4303c176bbd@fb9exmb2.fb9.uni-osnabrueck.de> References: <008901d2ea45$f9217c50$eb6474f0$@cirad.fr> <42db7dcd6a6e4ff89c4bf4303c176bbd@fb9exmb2.fb9.uni-osnabrueck.de> Message-ID: <002201d2eb3a$594a0760$0bde1620$@cirad.fr> Dear Melanie, Thank you for the remark. In fact, it is an unlabeled experiment with a status quo option (SQ). The first alternative is the SQ, and so I coded it so that only that SQ equation get an intercept (to estimate the value of the SQ as compared to adopt one of the two alternatives). In any case this does not prevent the model to run. In any case, thank you for your careful observation. Damien -----Message d'origine----- De?: limdep-bounces at limdep.itls.usyd.edu.au [mailto:limdep-bounces at limdep.itls.usyd.edu.au] De la part de Melanie Velarde Envoy??: Thursday, June 22, 2017 1:36 PM ??: Limdep and Nlogit Mailing List Objet?: Re: [Limdep Nlogit List] Heuristics & latent classes using Maximize in nlogit 5. How can I take into account the quasi-panel structure of experiment? Dear Damien, I cannot answer your question, sorry... But I noticed that you're missing a constant in your model specification, which I find unusual... Just wanted to point that out, in case that didn't happen on purpose. Best regards, Melanie Velarde -----Urspr?ngliche Nachricht----- Von: limdep-bounces at limdep.itls.usyd.edu.au [mailto:limdep-bounces at limdep.itls.usyd.edu.au] Im Auftrag von Damien Jourdain Gesendet: Mittwoch, 21. Juni 2017 06:22 An: limdep at limdep.itls.usyd.edu.au Betreff: [Limdep Nlogit List] Heuristics & latent classes using Maximize in nlogit 5. How can I take into account the quasi-panel structure of experiment? Dear List members, Sorry for the long message, but this is to describe the different steps before reaching my problem! We are analyzing a choice experiment using Nlogit5. ? MNL Model NLOGIT; ; Choices = 1,2,3 ; Lhs = Choice ; Rhs = SQ , BEN10, LAB10, CAS10, RISK10, ST, FERTHI, FERTLO $ During the interviews, we had noticed that many respondents tended to eliminate the alternative when FERTLO = 1 and FERTHI = 0 (in fact FERT is a nominal variable that we effect coded into FERTLO and FERTHI), we would like to test whether the heuristic is present in the population. I have looked at the Hensher et al. 2015, Applied choice analysis book and came out with the following procedures. (but I am using Nlogit 5 so far) First I checked that I could use Maximize to reproduce the simple MNL. Sample; All$ create; ch0 = Choice; ch1 = Choice[+1]; ch2 = Choice[+2]$ create; ben0 = ben10; ben1 = ben10[+1]; ben2 = ben10[+2]$ create; lab0 = lab10; lab1 = lab10[+1]; lab2 = lab10[+2]$ create; cas0 = cas10; cas1 = cas10[+1]; cas2 = cas10[+2]$ create; sto0 = st; sto1 = st[+1]; sto2 = st[+2]$ create; fhi0 = ferthi; fhi1 = ferthi[+1]; fhi2 = ferthi[+2]$ create; flo0 = fertlo; flo1 = fertlo[+1]; flo2 = fertlo[+2]$ create; J = Trn(-3, 0)$ reject; J > 1$ Namelist; x0 = ben0, lab0, cas0, sto0, fhi0, flo0; x1 = ben1, lab1, cas1, sto1, fhi1, flo1; x2 = ben2, lab2, cas2, sto2, fhi2, flo2 $ Calc; ks = Col(x0)$ Matrix; cs = init(ks,1,0.1) $ Maximize ; labels = interc, ks_bs ; start = 0.1, cs ; maxit = 30 ; Fcn = ut0 = interc+ bs1'x0 | v0 = exp(ut0) | ut1 = bs1'x1 | v1 = exp(ut1) | ut2 = bs1'x2 |v2 = exp(ut2) | IV = v0+ v1 + v2 | P = ( ch0*v0 + ch1*v1 + ch2*v2)/ IV | log(P) ; Output=1$ It gave the same results. Then I produced an Indicator variable (being equal to zero when the fertlo is present. It helps me modify the utility functions so that the utility of one alternative is equal to zero when the attribute is present. create; I1=1$ create; I2=1$ create; if(flo1=1 & fhi1= 0)I1=0$ create; if(flo2=1 & fhi2= 0)I2=0$ Maximize ; labels = intercep, ks_bs ; start = 0.1, cs ? ; maxit = 30 ; Fcn = ut0 = intercep+ bs1'x0 | v0 = exp(ut0) | ut1 = I1 * (bs1'x1) | ? the utility is becoming null when the fertlo indicator is present in the alternative v1 = exp(ut1) | ut2 = I2*(bs1'x2) | v2 = exp(ut2) | IV = v0+ v1 + v2 | P = ( ch0*v0 + ch1*v1 + ch2*v2)/ IV | log(P) ; Output=1$ Finally I am trying to develop a latent class analysis so that I can identify whether the two types of heuristics are present in the sample. ? Latent class analysis Calc; ks2 = Col(x0)$ Matrix; cs2 = init(ks2,1,0.1) $ Maximize ; labels = inter, ks_ba, inter2, ks2_bb, gamma ; start = 0.1, cs, 0.1, cs2, 0.1 ; maxit = 30 ; Fcn = ut0c1 = inter+ ba1'x0 | v0c1 = exp(ut0c1) | ut1c1 = ba1'x1 |v1c1 = exp(ut1c1) | ut2c1 = ba1'x2 |v2c1 = exp(ut2c1) | IVc1 = v0c1+ v1c1 + v2c1 | Pc1 = ( ch0*v0c1 + ch1*v1c1 + ch2*v2c1)/ IVc1 | ut0c2 = inter2+ bb1'x0 | v0c2 = exp(ut0c2) | ut1c2 = I1 * (bb1'x1) | v1c2 = exp(ut1c2) | ut2c2 = I2*(bb1'x2) | v2c2 = exp(ut2c2) | IVc2 = v0c2+ v1c2 + v2c2 | Pc2 = ( ch0*v0c2 + ch1*v1c2 + ch2*v2c2)/ IVc2 | Pprob = 1 / (1+exp(gamma))| P = Pprob * Pc1 + (1-Pprob) * Pc2 | log(P) ; Output=1$ While the model is running ok, I realize that I am not taking into account the fact that respondents are actually answering 6 choice sets (quasi-panel?), but I cannot find a meaningful way to write that using Maximize ? Anybody already faced this kind of issue? Best, Damien Dr. Damien Jourdain Agricultural and Natural Resources Economist Visiting Assistant Professor Asian Institute of Technology / CIRAD G-EAU Natural Resource Management / Water Engineering and Management mail: djourdain at ait.asia web GEAU : www.g-eau.net web NRM : www.nrm.ait.asia _______________________________________________ Limdep site list Limdep at limdep.itls.usyd.edu.au http://limdep.itls.usyd.edu.au _______________________________________________ Limdep site list Limdep at limdep.itls.usyd.edu.au http://limdep.itls.usyd.edu.au