Announcement

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

  • mixlogitwtp

    Dear users,

    I am using the stata command of mixlogitwtp by Hole(2016) in my choice data. However, I had some difficulties. When I included the constant (opt-out option) to the command, it did not work. What can be the problem? Also, I would like to compare the WTP of attributes for two experiments. I created a dummy variable (0 1) and test the treatment effect. However, it did not work. I would be very glad if you can help me.

    Thank you
    Ozge

  • #2
    I do not think I have enough information to answer why you failed to estimate the model specification with an alternative-specific constant for the opt-out option. You can show us your data and command line to allow one of us can get back to you with something useful.

    You do not need to create any extra variable to compare WTP measures for two different attributes. You can use Stata's postestimation command -test- on your coefficient estimates as usual to carry out either single (e.g., compare whether the mean WTP is the same for two different attributes) or joint hypothesis tests (e.g., compare whether the marginal distribution of the WTP for one attribute is the same as that of the other).
    Last edited by Hong Il Yoo; 10 Jan 2021, 06:32.

    Comment


    • #3
      Thank you very much for your response

      I have choice experiment data and the command is below. I defined a constant variable for the opt-out option but the model was not converged.
      mixlogitwtp outcome constant, group( obsid ) id( personid ) rand (cert loc hlth env anm) price(mprice ) nrep(10)


      pid obsid outc alt cert loc hlth env anm price
      1 1 1 0 1 1 0 1 0 1 13
      1 1 0 0 2 0 1 0 1 0 17
      1 1 0 1 3 0 0 0 0 0 0
      1 2 1 0 1 1 0 0 1 0 17
      1 2 0 0 2 0 1 1 0 1 21
      1 2 0 1 3 0 0 0 0 0 0
      1 3 0 0 1 1 0 1 0 0 17
      1 3 1 0 2 0 1 0 1 1 13
      1 3 0 1 3 0 0 0 0 0 0
      1 4 0 0 1 1 0 1 1 1 17
      1 4 1 0 2 0 1 0 0 0 13
      1 4 0 1 3 0 0 0 0 0 0
      1 5 1 0 1 1 0 1 1 1 13
      1 5 0 0 2 0 1 0 0 0 17
      1 5 0 1 3 0 0 0 0 0 0


      I would like to compare the WTP of the two experiments results. I defined a treatment variable (0 for control 1 for treatment) then multiplied by may attribute variables for pooled data. Then I included them in the model. the error "Initital values are not feasible" occurred. How can I compare the distribution of WTP, I really do not know. Should I pool the data? how should I write the command?

      Thank you very much
      Ozge

      Comment


      • #4
        I do not see the variable "constant" in your example data set so I still cannot provide an answer.

        I see, I misunderstood your second question. What you're interested in doing is comparing the WTP for the same attribute in two different experiments, rather than the WTP for two different attributes in the same experiment. My suggestion here is that you first check whether you have generated interaction terms correctly. Rather than estimating -mixlogitwtp-, you can try to estimate a simple -clogit- model with the same set of interaction terms. If your -clogit- does not go through, you know that the problem lies in the interaction terms that you have generated rather than the -mixlogitwtp- command or the random coefficient specification per se.

        Comment


        • #5
          I am sorry. I forgot to write constant term. (I have three alternatives I wrote 1 for opt-out option and 0 for others). Yes, I have two different experiments and I want to compare same attributes for two experiments. I did it in clogit and there was no problem.

          pidobsidoutcconst alt cert loc hlth env anm price
          1 1 1 0 1 1 0 1 0 1 13
          1 1 0 0 2 0 1 0 1 0 17
          1 1 0 1 3 0 0 0 0 0 0
          1 2 1 0 1 1 0 0 1 0 17
          1 2 0 0 2 0 1 1 0 1 21
          1 2 0 1 3 0 0 0 0 0 0
          1 3 0 0 1 1 0 1 0 0 17
          1 3 1 0 2 0 1 0 1 1 13
          1 3 0 1 3 0 0 0 0 0 0
          1 4 0 0 1 1 0 1 1 1 17
          1 4 1 0 2 0 1 0 0 0 13
          1 4 0 1 3 0 0 0 0 0 0
          1 5 1 0 1 1 0 1 1 1 13
          1 5 0 0 2 0 1 0 0 0 17
          1 5 0 1 3 0 0 0 0 0 0
          1 6 1 0 1 1 0 0 1 0 21

          Comment


          • #6
            At least from the subset of the data file that you have posted, I do not see any potential identification issue (provided that you actually observe someone who picked the outside option).

            One approach you can take here is to look for better starting values. For example, in the case of your first problem, you can estimate -mixlogit- without the alternative-specific constant. Then, you can use the -mixlogit- command's -from()- option to use those results as starting values for your full specification. You can tackle your second problem the same way, first by estimating the pooled model and then using the results as starting values for your model with treatment effects.

            I'm not sure whether this may help or not, but you can increase the number of replications to, say, 100. At least in case of -gmnl-, Arne Risa Hole and colleagues report in their Stata Journal paper that increasing the number of replications actually help numerical convergence.

            Finally, some time ago, I shared a number of things that I found useful when I ran across "not converged" errors. Please take a look at:

            https://www.statalist.org/forums/for...it#post1545090

            and see if you find any of them helps you.

            Comment


            • #7
              Thank you for suggestions,

              Should I write the command matrix b0=e(b) then mixlogit command with from(b0) I am not familiar with this command. Thank you for your help.

              Comment


              • #8
                Thanks. Yes that is correct. FYI, Arne has published a background paper for -mixlogit- in the Stata Journal:

                https://www.stata-journal.com/sjsear...arne+risa+hole

                Comment


                • #9
                  Thank you very much

                  I have realized that there was also a problem with pooled data because I cannot run mixlogitwtp without treatment variables. I wonder If there is a problem with number of observation.

                  Comment


                  • #10
                    Also, when I tested the treatment effect, there was an error "Some variables are collinear - check your model specification". I multiplied the treatment variable with my random variables. What could be the problem?

                    Thank you very much

                    Comment


                    • #11
                      The problem was with my variables. I fixed it. Thank you very much for your help.

                      Comment

                      Working...
                      X