Announcement

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

  • Problems with lclogitml2 and estimating the WTP using lclogitwtp2

    Dear all,

    I am running a discrete choice model using lclogit2 and lclogitml2. I tested the model and decided to run it with 3 classes and to make the price-coefficient class-invariant or in other words, to include price as homogeneous coefficients that is identical across classes.
    I figuered out that it is not possible to use the postestimation command lclogitwtp2 when using the above described specification.
    Error:
    lclogitwtp2, cost(price) post
    __000002 not found


    I tried to implement a constraint
    Code:
    constraint 1 [Class1]price = [Class2]price = [Class3]price
    , which, however, only constrains the price-coefficient of the first and second class to be class-invariant.

    I also tried to implement 2 constraints
    Code:
    constraint 1 [Class1]price = [Class2]price = [Class3]price
    Code:
    constraint 2 [Class1]price= [Class3]price
    , which also did not work.

    The entire code applied is the following

    Code:
    lclogit2 choice, rand(price rate_2 strike_level channel_radio channel_randp ///
        certification_gov certification_ngo ASC) group(idchoice) id(id0) nclasses(3)seed(1234567890)
    matrix start3 =e(b)
    
    constraint 1 [Class1]price = [Class2]price = [Class3]price
    lclogitml2 choice, rand(price rate_2 strike_level channel_radio channel_randp ///
        certification_gov certification_ngo ASC) group(idchoice) id(id0) nclasses(3) ///
        from(start3)constraint(1) seed(1234567890)
    
    lclogitwtp2, cost(price) post
    Is there a proper way to estimate the WTP when using a latent class model with 3 classes and a class-invariant price coefficient using the constraint option?

    Thanks in advance!!
    Maike
    Last edited by Maike Linhoff; 16 Apr 2020, 08:16.

  • #2
    Hi Maike, thanks for bringing this to my attention. There is a little bug in the loop which causes the problem when price is the only class-invariant coefficient. I will fix that and release a new version soon. As far as I can check, however, -lclogitwtp2- works fine with the constraint approach that you have suggested. Please make sure that each constraint defines one restriction, instead of two different restrictions. Also, if you'd like to impose both constraints 1 and 2, you should specify -constraint(1 2)- option.

    Edited: OK I now have a revised version of -lclogitwtp2.ado- on my hard disk. I will let you know once it becomes available for -ssc install-. If you need the file urgently, you can email me at [email protected].
    Last edited by Hong Il Yoo; 16 Apr 2020, 10:17.

    Comment


    • #3
      The updated version of -lclogitwtp2.ado- is available for downloads now, thanks to Kit Baum as usual. Please type -ssc install lclogit2, replace- at the command prompt.

      Comment


      • #4
        Dear Hong II Yoo,

        thank you a lot for your immediate action, now it works perfectly!!

        Comment


        • #5
          Dear Hong II Yoo,

          I'm using the lclogit2 command to determine latent classes from Best Worst Scaling data. My study solicits improved cookstove preferences from 28 attributes. I have succeeded in running the lclogit2 command for a 5-class model. And I have both the response variable effects per class and covariate effects per class. I am now running the lclogitml2 command to get standard error values. Each iteration so far is taking about 2 to 3 hrs to appear. Why is it taking so long to produce output? I have a total of 50,400 observations with 34 variables. How can I speed up the analysis? Take note I am not a statistician so please try and explain this to me in a simple manner. Thank you.

          Comment

          Working...
          X