[Limdep Nlogit List] Running automatically mixed logit models with different seeds

William Greene wgreene at stern.nyu.edu
Wed Mar 9 03:09:44 AEDT 2016


Jose. I do not see what "cont" is doing in the procedure.  But, the value
you
give to RAN has to be a scalar.  It doesn't have to be random however.
Every
different value gives a completely different stream of draws.  So, you could
actually use CONT itself.  I would use something like

CALC ; iseed = 3517 $ before the loop,
CALC ; Ran(iseed) $ to set the seed, then
CALC ; iseed = iseed + 1002 $ where you increment CONT.

/Bill Greene

On Tue, Mar 8, 2016 at 9:34 AM, José L. Oviedo <jose.oviedo at cchs.csic.es>
wrote:

> Dear Limdep users:
>
>
>
> I am running a series of mixed logit models which are not very stable;
> meaning, my estimation results can be quiet different when I change the
> seed.
>
>
>
> I would be very interested in finding a way to create a loop so that I can
> make a large number of models in which the seed is changed every time,
> without the need to do this manually.
>
>
>
> Based on my previous experience with limdep sintax I created this command:
>
>
>
> calc; cont=1$
>
> create; alea=Rnn(0,1)$
>
> proc
>
> CALC  ; ran(alea)$
>
> skip;
>
> NLOGIT ; LHS=LUC06
>
>        ; CHOICES=A1,A2,A3
>
>        ; RPL
>
>        ;
>
> Fcn=bCRO(N),bFOR(N),bLINCCP2(N),bSUBCP2(N),bLINCRP2(N),bSUBRP2(N),bLINCFP2(N
> ),bSUBFP2(N)
>
>        ; MODEL:u(A1) = bCRO*CRO+bFOR*FOR+bLINCCP2*LINCP2+bSUBCP2*SUBP2/
>
>                u(A2) = bCRO*CRO+bFOR*FOR+bLINCRP2*LINCP2+bSUBRP2*SUBP2/
>
>                u(A3) = bCRO*CRO+bFOR*FOR+bLINCFP2*LINCP2+bSUBFP2*SUBP2$
>
> calc; cont=cont+1$
>
> endproc
>
> execute; n=100$
>
>
>
> but it does not recognize “alea” as a number. Clearly, I am doing it wrong
> but before exploring further this possibility, I would like to know if this
> is possible at all.
>
>
>
> Thanks for your help
>
>
>
> Cheers,
>
>
>
> José L. Oviedo
>
> Institute of Public Goods and Policies (IPP) Spanish National Research
> Council (CSIC) C/ Albasanz, 26-28, E-28037 Madrid, España
>
> Tel: +34-916022448
>
>
>
> _______________________________________________
> Limdep site list
> Limdep at limdep.itls.usyd.edu.au
> http://limdep.itls.usyd.edu.au
>



-- 
William Greene
Department of Economics
Stern School of Business, New York University
44 West 4 St., 7-90
New York, NY, 10012
URL: http://people.stern.nyu.edu/wgreene
Email: wgreene at stern.nyu.edu
Ph. +1.212.998.0876


More information about the Limdep mailing list