[Limdep Nlogit List] Interpretation of RPL coefficients when using lognormal distribution: why results from direct estimation and from estimated parameters are not giving the same results?
Damien Jourdain
djourdain at ait.asia
Fri Feb 16 01:33:20 AEDT 2018
Dear Mik,
Thank you.
I've looked again, and I think found the mistake I made.
When creating the variables from the matrix, I forgot to add the "Sample; 1-1400". By failing to do so, I suppose the calculation of the average include all the zeros for the variable BNPR (from 1401 to 13500 ... since I have 13500 rows). This result in an average that is much smaller than the reality!
I am now adding the following line Sample ; 1-1400$ before getting the parameters from the matrix
When I tried again with this statement, I find the calculated from direct estimation being quite close to the average of posterior individual-specific estimates. If that is correct, there is no need to use the exponential of the coefficients.
|-> CALC; List; XBR(BNPR)$
[CALC] = .3199974
|-> create; expBNPR = exp(BNPR)$
|-> calc; list; xbr(expBNPR)$
[CALC] = 1.6429415
|-> CALC; LIST; exp(-1.95961 + (1.31682^2)/2)$
[CALC] = .3353426
Again, thank you for your help and interest.
Damien
-----Message d'origine-----
De : Mikołaj Czajkowski [mailto:mc at uw.edu.pl]
Envoyé : Thursday, February 15, 2018 3:21 PM
À : Damien Jourdain
Objet : Re: [Limdep Nlogit List] Interpretation of RPL coefficients when using lognormal distribution: why results from direct estimation and from estimated parameters are not giving the same results?
Dear Damien,
This is what I would expect - direct estimation using coefficients is likely always better than the one based on posterior individual-specific estimates (even though asymptotically they should be equivalent).
Best regards,
Mik
On 2018-02-15 12:41, Damien Jourdain wrote:
> Dear Mik,
>
> Thank you for the suggestion.
>
> I tried that but there is still an important difference between the two.
>
> |-> create; expBNPR = exp(BNPR)$
> |-> calc; list; xbr(expBNPR)$
> [CALC] = 1.0329355
>
> As the direct estimation from the coefficients is giving :
>> |-> CALC; LIST; EXP(-1.61991 + (0.99479^2)/2)$
>> [CALC] = .3246179
> By the way, the more 'realistic' calculation is the direct estimation
> from the coefficients (at least it is of the same magnitude than the
> MNL coefficient for price)
>
>
> Damien
>
>
> -----Message d'origine-----
>
> De : Mikołaj Czajkowski [mailto:mc at uw.edu.pl] Envoyé : Thursday,
> February 15, 2018 12:34 PM À : Damien Jourdain Objet : Re: [Limdep
> Nlogit List] Interpretation of RPL coefficients when using lognormal distribution: why results from direct estimation and from estimated parameters are not giving the same results?
>
>
> Dear Damien,
>
> Shoulnd't you have something like:
>
> create; expBNPR = exp(BNPR)$
>
> first?
>
> Then
> calc; list; xbr(expBNPR)$
>
> Cheers,
> Mik
>
>
>
>
> On 2018-02-15 11:26, Damien Jourdain wrote:
>> Dear All,
>>
>>
>>
>> I developing a RPL model using choice experiment data
>>
>>
>>
>> The model is as followed:
>>
>>
>>
>> Calc; Ran(1234567)$
>>
>> RPLOGIT
>>
>> ; Choices = 1,2,3
>>
>> ; Lhs = CHOICE, CSET, ALT
>>
>> ; Rhs = L_IMP, L_RAU, L_GAP, L_PGS,
>>
>> FRESH, O_SUPE, O_SPEC, NPRICE
>>
>> ; Fcn = L_IMP(n), L_RAU(n), L_GAP(n),
>>
>> L_PGS(n), FRESH(n), O_SUPE(n), O_SPEC(n), NPRICE(l)
>>
>> ; Halton
>>
>> ; Pds = csi
>>
>> ; Pts = 20
>>
>> ; Parameters
>>
>> ; Maxit = 150$
>>
>>
>>
>> I have changed the price attribute to negative values, so I can use a
>> lognormal distribution of for the price attribute.
>>
>> I am getting the following results
>>
>>
>>
>> --------+------------------------------------------------------------
>> --------+-
>> --------+------
>> -
>>
>> | Standard Prob. 95% Confidence
>>
>> CHOICE| Coefficient Error z |z|>Z* Interval
>>
>> --------+------------------------------------------------------------
>> --------+-
>> --------+------
>> -
>>
>> |Random parameters in utility
>> functions..............................
>>
>> L_IMP| -1.11608*** .29152 -3.83 .0001 -1.68745 -.54470
>>
>> L_RAU| 1.49941*** .09880 15.18 .0000 1.30577 1.69304
>>
>> L_GAP| 1.82794*** .10487 17.43 .0000 1.62239 2.03349
>>
>> L_PGS| .63730** .25734 2.48 .0133 .13291 1.14168
>>
>> FRESH| -.61318*** .05496 -11.16 .0000 -.72089 -.50546
>>
>> O_SUPE| .43891*** .07567 5.80 .0000 .29060 .58721
>>
>> O_SPEC| -.76256*** .17329 -4.40 .0000 -1.10221 -.42291
>>
>> NPRICE| -1.61991*** .33228 -4.88 .0000 -2.27117 -.96865
>>
>> |Distns. of RPs. Std.Devs or limits of
>> triangular....................
>>
>> NsL_IMP| 1.52346*** .31666 4.81 .0000 .90281 2.14410
>>
>> NsL_RAU| .69380*** .13439 5.16 .0000 .43040 .95721
>>
>> NsL_GAP| .01744 .24287 .07 .9427 -.45858 .49346
>>
>> NsL_PGS| .95598*** .21017 4.55 .0000 .54405 1.36790
>>
>> NsFRESH| .48681*** .05657 8.60 .0000 .37593 .59770
>>
>> NsO_SUPE| 1.65455*** .11307 14.63 .0000 1.43293 1.87616
>>
>> NsO_SPEC| 1.08890*** .12068 9.02 .0000 .85237 1.32544
>>
>> LsNPRICE| .99479*** .18655 5.33 .0000 .62917 1.36041
>>
>>
>>
>> If I am not wrong, I can calculate the population mean of the price
>> E(beta) = exp(beta + sigma^2/2)
>>
>> |-> CALC; LIST; EXP(-1.61991 + (0.99479^2)/2)$
>>
>> [CALC] = .3246179
>>
>>
>>
>> Then, I am using the procedure described in section N29.8.2 of the
>> Nlogit manual to examine the distribution of the parameters.
>>
>> Matrix; bn = beta_i; sn =sdbeta_i $
>>
>> CREATE; BIMP=0; BRAU=0; BGAP=0; BPGS=0; BFRE =0; BSUP=0; BSPE=0;
>> BNPR=0 $
>>
>> CREATE ;SIMP=0; SRAU=0; SGAP=0; SPGS=0; SFRE =0; SSUP=0; SSPE=0;
>> SNPR=0 $
>>
>> NAMELIST; betan = BIMP,BRAU, BGAP, BPGS, BFRE, BSUP, BSPE, BNPR$
>>
>> NAMELIST; sbetan = SIMP,SRAU, SGAP, SPGS, SFRE, SSUP, SSPE, SNPR$
>>
>> CREATE ; betan =bn$
>>
>> CREATE ; sbetan = sn$
>>
>>
>>
>> CALC; List; XBR(BNPR)$ ? calculate the average of the beta for nprice
>>
>>
>>
>> |-> CALC; List; XBR(BNPR)$
>>
>> [CALC] = .0257560
>>
>>
>>
>> My understanding is that these two figures should be close to one another.
>> Is there anything that could explain such difference between these
>> two ways to estimate the results?
>>
>>
>>
>> Any help is welcomed?
>>
>>
>>
>> Best,
>>
>>
>>
>> Damien
>>
>>
>>
>> _______________________________________________
>> Limdep site list
>> Limdep at mailman.sydney.edu.au
>> http://limdep.itls.usyd.edu.au
>>
More information about the Limdep
mailing list