From ioanna.grammatikopoulou at luke.fi Thu Feb 6 00:46:31 2020
From: ioanna.grammatikopoulou at luke.fi (Grammatikopoulou Ioanna (Luke))
Date: Wed, 5 Feb 2020 13:46:31 +0000
Subject: [Limdep Nlogit List] non linear mixed logit model
Message-ID:
Hi!
I am applying a non linear mixed logit model. One of the parameters of the non linear function that I want to estimate needs to be positive. How can I impose such a restriction? I used the cml; command but it didn't work. Also, estimation time is quite large (it can be two to three weeks for 250 draws that I have applied). Is there any way to speed up the model estimation?
Here is my syntax:
NLRPLOGIT
;Lhs=CHOICE
;Choices=BAU,ALT1,ALT2
;Pds=6
;Labels=b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,r,g
;Start=0.22,0.89,0.13,0.12,0.39,-0.01,0.29,0.10,0.08,0.03,0.14,-0.002,0.1,0.5
;fcn=b0(n),b1(n),b2(n),b3(n),b4(n),b5(n),b6(n),b7(n),b8(n),b9(n),b10(n)
;halton
;cml:r>0
;draws=250
;rpl
;Fn1=pv=(1*VERSIO2+g*((1/(1+r)^(D+0))*(1-VERSIO2)+1/(1+r)^(D+1)+1/(1+r)^(D+2)+1/(1+r)^(D+3)+1/(1+r)^(D+4)+1/(1+r)^(D+5)+1/(1+r)^(D+6)+1/
(1+r)^(D+7)+1/(1+r)^(D+8)+1/(1+r)^(D+9)))
*annual+(1-annual)
;Fn2=Util1=b0*BAU
+b1*carbon1+b2*carbon2+b3*biod1+b4*biod2+b5*water1+b6*water2+b7*berry1+b8*berry2+b9*energy1+b10*energy2+
b11*pv*costrecf
;Fn3=Util2=b1*carbon1+b2*carbon2+b3*biod1+b4*biod2+b5*water1+b6*water2+b7*berry1+b8*berry2+b9*energy1+b10*energy2+
b11*pv*costrecf
;Model:
U(BAU)=Util1/U(ALT1, ALT2)=Util2$
Thank you in advance
Kind regards
Ioanna
Ioanna Grammatikopoulou
Post-doc fellow
Natural Resource Institute Finland (LUKE)
Latokartanonkaari 9
FI-00790, Helsinki
Finland
E-mail: ioanna.grammatikopoulou at luke.fi
From wgreene at stern.nyu.edu Thu Feb 6 14:15:06 2020
From: wgreene at stern.nyu.edu (William Greene)
Date: Wed, 5 Feb 2020 22:15:06 -0500
Subject: [Limdep Nlogit List] non linear mixed logit model
In-Reply-To:
References:
Message-ID:
Ioanna. You can't use CML to do this. It's easier. In principle, you can
just change "r" to "exp(r)" in the function
definition. Assuming this gets you estimates, the estimator of "r" is the
exponent of what you get. BUT, I will
guess that either (1) your estimate of "r" will be large and negative or
(2) the restriction will be redundant.
On your second question, if you can find a way to combine terms, that will
help. Also, for an RP model, your
model is huge. You should expect it to take a very long time with that
many RPs. You do not need 250 draws,
however. 100 should be sufficient.
/Bill Greene
On Wed, Feb 5, 2020 at 9:02 AM Grammatikopoulou Ioanna (Luke) <
ioanna.grammatikopoulou at luke.fi> wrote:
> Hi!
> I am applying a non linear mixed logit model. One of the parameters of the
> non linear function that I want to estimate needs to be positive. How can I
> impose such a restriction? I used the cml; command but it didn't work.
> Also, estimation time is quite large (it can be two to three weeks for 250
> draws that I have applied). Is there any way to speed up the model
> estimation?
> Here is my syntax:
>
> NLRPLOGIT
> ;Lhs=CHOICE
> ;Choices=BAU,ALT1,ALT2
> ;Pds=6
> ;Labels=b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,r,g
>
> ;Start=0.22,0.89,0.13,0.12,0.39,-0.01,0.29,0.10,0.08,0.03,0.14,-0.002,0.1,0.5
>
> ;fcn=b0(n),b1(n),b2(n),b3(n),b4(n),b5(n),b6(n),b7(n),b8(n),b9(n),b10(n)
> ;halton
> ;cml:r>0
> ;draws=250
> ;rpl
>
> ;Fn1=pv=(1*VERSIO2+g*((1/(1+r)^(D+0))*(1-VERSIO2)+1/(1+r)^(D+1)+1/(1+r)^(D+2)+1/(1+r)^(D+3)+1/(1+r)^(D+4)+1/(1+r)^(D+5)+1/(1+r)^(D+6)+1/
> (1+r)^(D+7)+1/(1+r)^(D+8)+1/(1+r)^(D+9)))
> *annual+(1-annual)
> ;Fn2=Util1=b0*BAU
>
> +b1*carbon1+b2*carbon2+b3*biod1+b4*biod2+b5*water1+b6*water2+b7*berry1+b8*berry2+b9*energy1+b10*energy2+
> b11*pv*costrecf
>
>
> ;Fn3=Util2=b1*carbon1+b2*carbon2+b3*biod1+b4*biod2+b5*water1+b6*water2+b7*berry1+b8*berry2+b9*energy1+b10*energy2+
> b11*pv*costrecf
> ;Model:
> U(BAU)=Util1/U(ALT1, ALT2)=Util2$
>
>
> Thank you in advance
>
> Kind regards
> Ioanna
>
>
> Ioanna Grammatikopoulou
> Post-doc fellow
> Natural Resource Institute Finland (LUKE)
> Latokartanonkaari 9
> FI-00790, Helsinki
> Finland
> E-mail: ioanna.grammatikopoulou at luke.fi ioanna.grammatikopoulou at luke.fi>
>
>
>
> _______________________________________________
> Limdep site list
> Limdep at mailman.sydney.edu.au
> http://limdep.itls.usyd.edu.au
>
>
--
William Greene
Department of Economics, emeritus
Stern School of Business, New York University
44 West 4 St.
New York, NY, 10012
URL: https://protect-au.mimecast.com/s/-5j3CYWL1viLJQnogt03NjM?domain=people.stern.nyu.edu
Email: wgreene at stern.nyu.edu
Ph. +1.646.596.3296
Editor in Chief: Journal of Productivity Analysis
Editor in Chief: Foundations and Trends in Econometrics
Associate Editor: Economics Letters
Associate Editor: Journal of Business and Economic Statistics
From ioanna.grammatikopoulou at luke.fi Fri Feb 7 22:29:30 2020
From: ioanna.grammatikopoulou at luke.fi (Grammatikopoulou Ioanna (Luke))
Date: Fri, 7 Feb 2020 11:29:30 +0000
Subject: [Limdep Nlogit List] non linear mixed logit model
In-Reply-To:
References:
Message-ID:
Thank you! It worked. Thanks also for the recommendations regarding the draws.
Ioanna
>-----Original Message-----
>From: Limdep [mailto:limdep-bounces at mailman.sydney.edu.au] On Behalf
>Of William Greene via Limdep
>Sent: 6. helmikuuta 2020 5:15
>To: Limdep and Nlogit Mailing List
>Cc: William Greene
>Subject: Re: [Limdep Nlogit List] non linear mixed logit model
>
>Ioanna. You can't use CML to do this. It's easier. In principle, you can
>just change "r" to "exp(r)" in the function
>definition. Assuming this gets you estimates, the estimator of "r" is the
>exponent of what you get. BUT, I will
>guess that either (1) your estimate of "r" will be large and negative or
>(2) the restriction will be redundant.
>On your second question, if you can find a way to combine terms, that will
>help. Also, for an RP model, your
>model is huge. You should expect it to take a very long time with that
>many RPs. You do not need 250 draws,
>however. 100 should be sufficient.
>/Bill Greene
>
>On Wed, Feb 5, 2020 at 9:02 AM Grammatikopoulou Ioanna (Luke) <
>ioanna.grammatikopoulou at luke.fi> wrote:
>
>> Hi!
>> I am applying a non linear mixed logit model. One of the parameters of the
>> non linear function that I want to estimate needs to be positive. How can I
>> impose such a restriction? I used the cml; command but it didn't work.
>> Also, estimation time is quite large (it can be two to three weeks for 250
>> draws that I have applied). Is there any way to speed up the model
>> estimation?
>> Here is my syntax:
>>
>> NLRPLOGIT
>> ;Lhs=CHOICE
>> ;Choices=BAU,ALT1,ALT2
>> ;Pds=6
>> ;Labels=b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,r,g
>>
>> ;Start=0.22,0.89,0.13,0.12,0.39,-0.01,0.29,0.10,0.08,0.03,0.14,-0.002,0.1,0.5
>>
>> ;fcn=b0(n),b1(n),b2(n),b3(n),b4(n),b5(n),b6(n),b7(n),b8(n),b9(n),b10(n)
>> ;halton
>> ;cml:r>0
>> ;draws=250
>> ;rpl
>>
>> ;Fn1=pv=(1*VERSIO2+g*((1/(1+r)^(D+0))*(1-
>VERSIO2)+1/(1+r)^(D+1)+1/(1+r)^(D+2)+1/(1+r)^(D+3)+1/(1+r)^(D+4)+1/(1+r
>)^(D+5)+1/(1+r)^(D+6)+1/
>> (1+r)^(D+7)+1/(1+r)^(D+8)+1/(1+r)^(D+9)))
>> *annual+(1-annual)
>> ;Fn2=Util1=b0*BAU
>>
>>
>+b1*carbon1+b2*carbon2+b3*biod1+b4*biod2+b5*water1+b6*water2+b7*
>berry1+b8*berry2+b9*energy1+b10*energy2+
>> b11*pv*costrecf
>>
>>
>>
>;Fn3=Util2=b1*carbon1+b2*carbon2+b3*biod1+b4*biod2+b5*water1+b6*wa
>ter2+b7*berry1+b8*berry2+b9*energy1+b10*energy2+
>> b11*pv*costrecf
>> ;Model:
>> U(BAU)=Util1/U(ALT1, ALT2)=Util2$
>>
>>
>> Thank you in advance
>>
>> Kind regards
>> Ioanna
>>
>>
>> Ioanna Grammatikopoulou
>> Post-doc fellow
>> Natural Resource Institute Finland (LUKE)
>> Latokartanonkaari 9
>> FI-00790, Helsinki
>> Finland
>> E-mail: ioanna.grammatikopoulou at luke.fi> ioanna.grammatikopoulou at luke.fi>
>>
>>
>>
>> _______________________________________________
>> Limdep site list
>> Limdep at mailman.sydney.edu.au
>> http://limdep.itls.usyd.edu.au
>>
>>
>
>--
>William Greene
>Department of Economics, emeritus
>Stern School of Business, New York University
>44 West 4 St.
>New York, NY, 10012
>URL: https://protect-au.mimecast.com/s/1qtICANZvPiN3pl4pHGQlKv?domain=people.stern.nyu.edu
>Email: wgreene at stern.nyu.edu
>Ph. +1.646.596.3296
>Editor in Chief: Journal of Productivity Analysis
>Editor in Chief: Foundations and Trends in Econometrics
>Associate Editor: Economics Letters
>Associate Editor: Journal of Business and Economic Statistics
>_______________________________________________
>Limdep site list
>Limdep at mailman.sydney.edu.au
>http://limdep.itls.usyd.edu.au
From liselotte.hagedoorn at vu.nl Sat Feb 8 00:27:05 2020
From: liselotte.hagedoorn at vu.nl (Hagedoorn, L.C.)
Date: Fri, 7 Feb 2020 13:27:05 +0000
Subject: [Limdep Nlogit List] Question
Message-ID: <13253b4ae7a54a09930845e611302e55@vu.nl>
Dear all,
I am running RPL models followed by Krinsky and Robb simulations (see code below). Does anyone know if the results of the Krinsky and Robb simulations (i.e. the 10,000 WTPs) are saved somewhere and if yes, where? Or if there is a command that I can use to save these somewhere?
Thanks in advance!
Best regards,
Liselotte Hagedoorn
Nlogit
;Lhs=choice
;Choices=1,2,3
;pds=10
;Halton
;rpl
;fcn=money(t,*),erosion(t,*),fish(t,*),visitors(t),asc(u)
;Maxit=500
;pts=3200;
model:
u(1,2)= money*money + erosion*erosion + fish*fish + visitors*visitors /
u(3)= asc;
pars
ECM=(1,2)$
matrix
;V_VARB=part(VARB,1,5,1,5)
;B_B=part(B,1,5,1,1)
$
WALD; Labels = a1,a2,a3,a4,a5
; Start = B_B
; Var = V_VARB
; fn1 = wteros = a2/-a1
; fn2 = wtfish = a3/-a1
; fn3 = wtvisit = a4/-a1
; fn4 = wtasc = a5/-a1
; K&R
; pts=10000$
From wgreene at stern.nyu.edu Sat Feb 8 12:29:41 2020
From: wgreene at stern.nyu.edu (William Greene)
Date: Fri, 7 Feb 2020 20:29:41 -0500
Subject: [Limdep Nlogit List] Question
In-Reply-To: <13253b4ae7a54a09930845e611302e55@vu.nl>
References: <13253b4ae7a54a09930845e611302e55@vu.nl>
Message-ID:
Dear Liselotte Hagedoorn. WALD does not save the 10,000 used for K&R.
You can easily use CREATE for the simple application below. Try this:
SAMPLE;1-10000$
CREATE ; a1kr=0;a2kr=0;a3kr=0;a4kr=0;a5kr=0$
NAMELIST;akr=a1kr,a2kr,a3kr,a4kr,a5kr$
CREATE;akr=Rmn(B_B,V_VARB) $
CREATE ; wteros = -ak2r/ak1r$
DSTAT ; Rhs=wteros $
and likewise for the other ones.
Regards
Bill Greene
On Fri, Feb 7, 2020 at 8:42 AM Hagedoorn, L.C. via Limdep <
limdep at mailman.sydney.edu.au> wrote:
> Dear all,
>
> I am running RPL models followed by Krinsky and Robb simulations (see code
> below). Does anyone know if the results of the Krinsky and Robb simulations
> (i.e. the 10,000 WTPs) are saved somewhere and if yes, where? Or if there
> is a command that I can use to save these somewhere?
>
> Thanks in advance!
>
> Best regards,
> Liselotte Hagedoorn
>
>
> Nlogit
> ;Lhs=choice
> ;Choices=1,2,3
> ;pds=10
> ;Halton
> ;rpl
> ;fcn=money(t,*),erosion(t,*),fish(t,*),visitors(t),asc(u)
> ;Maxit=500
> ;pts=3200;
> model:
> u(1,2)= money*money + erosion*erosion + fish*fish + visitors*visitors /
> u(3)= asc;
> pars
>
> ECM=(1,2)$
> matrix
> ;V_VARB=part(VARB,1,5,1,5)
> ;B_B=part(B,1,5,1,1)
> $
>
>
>
> WALD; Labels = a1,a2,a3,a4,a5
> ; Start = B_B
> ; Var = V_VARB
> ; fn1 = wteros = a2/-a1
> ; fn2 = wtfish = a3/-a1
> ; fn3 = wtvisit = a4/-a1
> ; fn4 = wtasc = a5/-a1
> ; K&R
> ; pts=10000$
>
> _______________________________________________
> Limdep site list
> Limdep at mailman.sydney.edu.au
> http://limdep.itls.usyd.edu.au
>
>
--
William Greene
Department of Economics, emeritus
Stern School of Business, New York University
44 West 4 St.
New York, NY, 10012
URL: https://protect-au.mimecast.com/s/8YoAC0YZWVFGDXGEyUwxaBp?domain=people.stern.nyu.edu
Email: wgreene at stern.nyu.edu
Ph. +1.646.596.3296
Editor in Chief: Journal of Productivity Analysis
Editor in Chief: Foundations and Trends in Econometrics
Associate Editor: Economics Letters
Associate Editor: Journal of Business and Economic Statistics
From liselotte.hagedoorn at vu.nl Thu Feb 13 21:48:50 2020
From: liselotte.hagedoorn at vu.nl (Hagedoorn, L.C.)
Date: Thu, 13 Feb 2020 10:48:50 +0000
Subject: [Limdep Nlogit List] Question
Message-ID: <3e7c6a9e72594cea8ffbc6ec3686ca01@vu.nl>
Dear all,
I am running RPL models with triangular distributions (see syntax below).
Now I would like to draw (10,000 times) from this triangular distribution, from which the moments (i.e. standard deviations and means) are known from the RPL models. Can anyone help me with the syntax for this procedure?
Thanks a lot in advance!
Best regards,
Liselotte Hagedoorn
|-> Nlogit
;Lhs=choice
;Choices=1,2,3
;pds=10
;Halton
;rpl
;fcn=timeneg(l),erosion(t,*),fish(t,*),visitors(t),asc(u)
;sdv=0,serosion,sfish,svisitors,sasc
;Maxit=500
;pts=3200;
model:
u(1,2)= erosion*erosion + fish*fish + visitors*visitors + timeneg*timeneg /
u(3)= asc;
pars
ECM=(1,2)$