Announcement

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

  • Mixlogit lognormal distribution error

    Hello, I'm currently trying to analyze my results using the mixed logit command in Stata (mixlogit).
    The code I am using is:

    mixtlogit Choice, rand(Camera Weight Screen Battery_l Price_l) ln(2) group(group) id(ID).

    I am trying to analyze the Battery and Price variable as lognormal distribution. I have multiplied the variables by -1 (as lognormal distribution requires negative values) and therefore all of the values in the variables have negative values. However when I run the code, I get an error saying "Variables specified to have log-normally distributed coefficients should have positive coefficients in the conditional logit model. Try multiplying the variable by -1." Meaning that because the results of the coefficients need to have positive values, the variables must have negative values. But I have already multiplied the values in the variable by -1 and all have negative values.

    When I use the positive values of Battery and Price, running the two variables as having lognormal distribution, the code works and I receive results as it would come out in a lognormal distribution. However, when I evaluate the individual betas of the results, the average of the coefficients is very different from the results given by Stata. For example, the Stata gives the result of the Price coefficient as 4.0623, however the average of the individual betas end up as 0.65. While the average of the individual betas do not have to be exactly same as the overall results given by Stata, the two results that I have got is not even close and gives me doubt about the results.

    Why does the lognormal distribution not work when the variables are negative? Why are the results from the overall outcome and the individual beta so different when the lognormal is assumed for the positive values? Please help, I have had this problem before but I do not understand why this is happening.

  • #2
    Jinhyung Kim: Without knowing much about the background for your research, I'm making my own assumptions here. Am I right in thinking that you're modelling a choice from mobile phones or tablets, such that battery is a good attribute in the sense that people like a higher battery capacity and price is a bad attribute in the sense that people dislike a higher price? You can quickly check if this is the case with your data by running a conditional logit model, with the original values of battery and price (before multiplication by -1) among the list of independent variables, and checking whether the battery coefficient is positive and the price coefficient is negative. If this is indeed the case, your log-normal mixed logit model should use the original values of battery (that is, without multiplying by -1) and the negative price (i.e., price * -1) as independent variables. As a rule of thumb, when specifying a log-normal mixed logit model using Arne Risa Hole's -mixlogit- command:

    (1) multiply a bad attribute by -1;
    (2) do not multiply a good attribute by -1.

    Comment

    Working...
    X