Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • starting values in mixedlogit

    Dear All,
    I am analyzing a DCE to estimate WTP values for environmental protection and I am trying different approaches mixed logit gmnl and WTP space.
    1) Question
    I run a mixed logit model with lognormal price coefficient (p)
    firstly I transformed p into a non negative variable


    gen mprice=-1*p

    Then I run the mixed logit

    mixlogit d , group(id) rand(f r mprice) id(Id) ln(1) nrep(50)

    with the following results

    d Coef. Std. Err. z P>z [95% Conf. Interval]

    Mean
    f .8806705 .055364 15.91 0.000 .772159 .989182
    r 1.739759 .0919498 18.92 0.000 1.559541 1.919978
    mprice .8917631 .0717043 12.44 0.000 .7512252 1.032301

    SD
    f .7638781 .0943571 8.10 0.000 .5789416 .9488145
    r .8516495 .1039393 8.19 0.000 .6479323 1.055367
    mprice .9619734 .0943854 10.19 0.000 .7769815 1.146965


    As seen the mprice sign is positive is this correct?
    Then I transform the price coefficients and estimate the mean median and standard deivation

    nlcom (mean_price: -1*exp([Mean]_b[mprice]+0.5*[SD]_b[mprice]^2)) (med_price: -1*exp([Mean]_b[mprice]))(sd_price: exp([Mean]_b[mprice]+0.5*[SD]_b[mprice]^2) * sqrt(exp([SD]_b[mprice]^2)-1))

    when I obtain these values how can I estimate the WTP values ?

    d Coef. Std. Err. z P>z [95% Conf. Interval]

    mean_price -3.874666 .4394025 -8.82 0.000 -4.735879 -3.013453
    med_price -2.439427 .1749175 -13.95 0.000 -2.782259 -2.096595
    sd_price 4.7815 1.189924 4.02 0.000 2.449292 7.113707

    and now the second question I want to run a second regression with correlated coefficients using the starting values from the mixed logit: how can I do that? this is what I have done but I am not sure is correct….
    mixlogit d p, group(id) rand(f r) id(Id)nrep(1000)

    Log likelihood = -1753.3229 Prob > chi2 = 0.0000


    d Coef. Std. Err. z P>z [95% Conf. Interval]

    Mean
    p -1.961931 .0822945 -23.84 0.000 -2.123226 -1.800637
    f .7863766 .0577565 13.62 0.000 .6731759 .8995773
    r 1.53036 .068974 22.19 0.000 1.395174 1.665547

    SD
    f .8402785 .0635261 13.23 0.000 .7157697 .9647874
    r .6378639 .0602608 10.59 0.000 .5197549 .7559729

    matrix b = e(b)


    matrix b = b[1,5],0,0,0,0,0

    results:



    LR chi2(3) = 464.32
    Log likelihood = -1746.8525 Prob > chi2 = 0.0000


    d Coef. Std. Err. z P>z [95% Conf. Interval]

    p 1.954885 .0825494 -23.68 0.000 -2.116679 -1.793091
    f .8327778 .0608246 13.69 0.000 .7135638 .9519918
    r 1.536822 .0693505 22.16 0.000 1.400898 1.672747

    /l11 .8628636 .0669893 12.88 0.000 .7315669 .9941603
    /l21 .2042594 .0559398 3.65 0.000 .0946194 .3138994
    /l22 -.599216 .0619962 -9.67 0.000 -.7207263 -.4777058


    Thank you very much for your help
    Kind Regards
    Carla

  • #2
    Carla:
    welcome to this forum.
    As per FAQ, please re-post your query on the General forum (using CODE delimiters, that can be accessed by clicking the # toggle of Advanced editor), as this one is for practicing purposes only. Thanks.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Grazie Carlo

      Comment

      Working...
      X