Announcement

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

  • Implications of nrep(#) on mixlogit analysis

    Dear All,

    I am analyzing discrete choice experiment data through the user-written command mixlogit. Below is the example of my dataset.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input int ID byte(Alternatives Choice Price Biodiversity Flood Forest Livelihood SEX AGE YRS_OF_SCHOOLING) double YRS_OF_RESIDENCY byte HH_Size double HH_INCOME
     1 1 1 0 1 1 1 1 0 55  4  5 6  4800
     1 2 0 1 3 2 2 2 0 55  4  5 6  4800
     1 3 0 5 2 3 1 1 0 55  4  5 6  4800
     2 1 1 0 1 1 1 1 0 55  4  5 6  4800
     2 2 0 2 1 2 3 3 0 55  4  5 6  4800
     2 3 0 4 1 3 2 2 0 55  4  5 6  4800
     3 1 1 0 1 1 1 1 0 55  4  5 6  4800
     3 2 0 3 2 2 2 1 0 55  4  5 6  4800
     3 3 0 1 2 2 1 3 0 55  4  5 6  4800
     4 1 1 0 1 1 1 1 0 55  4  5 6  4800
     4 2 0 1 3 3 2 3 0 55  4  5 6  4800
     4 3 0 5 1 2 1 1 0 55  4  5 6  4800
     5 1 1 0 1 1 1 1 0 55  4  5 6  4800
     5 2 0 5 3 1 3 3 0 55  4  5 6  4800
     5 3 0 3 2 3 1 2 0 55  4  5 6  4800
     6 1 1 0 1 1 1 1 0 55  4  5 6  4800
     6 2 0 5 1 2 2 1 0 55  4  5 6  4800
     6 3 0 3 2 1 3 2 0 55  4  5 6  4800
     7 1 1 0 1 1 1 1 0 55  4  5 6  4800
     7 2 0 4 3 3 3 2 0 55  4  5 6  4800
     7 3 0 3 1 1 2 3 0 55  4  5 6  4800
     8 1 0 0 1 1 1 1 1 39 12 20 3 14500
     8 2 1 1 3 2 2 2 1 39 12 20 3 14500
     8 3 0 5 2 3 1 1 1 39 12 20 3 14500
     9 1 0 0 1 1 1 1 1 39 12 20 3 14500
     9 2 1 2 1 2 3 3 1 39 12 20 3 14500
     9 3 0 4 1 3 2 2 1 39 12 20 3 14500
    10 1 0 0 1 1 1 1 1 39 12 20 3 14500
    10 2 0 3 2 2 2 1 1 39 12 20 3 14500
    10 3 1 1 2 2 1 3 1 39 12 20 3 14500
    11 1 0 0 1 1 1 1 1 39 12 20 3 14500
    11 2 1 1 3 3 2 3 1 39 12 20 3 14500
    11 3 0 5 1 2 1 1 1 39 12 20 3 14500
    12 1 0 0 1 1 1 1 1 39 12 20 3 14500
    12 2 0 5 3 1 3 3 1 39 12 20 3 14500
    12 3 1 3 2 3 1 2 1 39 12 20 3 14500
    13 1 0 0 1 1 1 1 1 39 12 20 3 14500
    13 2 0 5 1 2 2 1 1 39 12 20 3 14500
    13 3 1 3 2 1 3 2 1 39 12 20 3 14500
    14 1 0 0 1 1 1 1 1 39 12 20 3 14500
    14 2 0 4 3 3 3 2 1 39 12 20 3 14500
    14 3 1 3 1 1 2 3 1 39 12 20 3 14500
    15 1 1 0 1 1 1 1 1 43 14 30 3  4000
    15 2 0 1 3 2 2 2 1 43 14 30 3  4000
    15 3 0 5 2 3 1 1 1 43 14 30 3  4000
    16 1 1 0 1 1 1 1 1 43 14 30 3  4000
    16 2 0 2 1 2 3 3 1 43 14 30 3  4000
    16 3 0 4 1 3 2 2 1 43 14 30 3  4000
    17 1 1 0 1 1 1 1 1 43 14 30 3  4000
    17 2 0 3 2 2 2 1 1 43 14 30 3  4000
    17 3 0 1 2 2 1 3 1 43 14 30 3  4000
    18 1 1 0 1 1 1 1 1 43 14 30 3  4000
    18 2 0 1 3 3 2 3 1 43 14 30 3  4000
    18 3 0 5 1 2 1 1 1 43 14 30 3  4000
    19 1 1 0 1 1 1 1 1 43 14 30 3  4000
    19 2 0 5 3 1 3 3 1 43 14 30 3  4000
    19 3 0 3 2 3 1 2 1 43 14 30 3  4000
    20 1 1 0 1 1 1 1 1 43 14 30 3  4000
    20 2 0 5 1 2 2 1 1 43 14 30 3  4000
    20 3 0 3 2 1 3 2 1 43 14 30 3  4000
    21 1 1 0 1 1 1 1 1 43 14 30 3  4000
    21 2 0 4 3 3 3 2 1 43 14 30 3  4000
    21 3 0 3 1 1 2 3 1 43 14 30 3  4000
    22 1 0 0 1 1 1 1 0 53  7 53 4 60000
    22 2 1 1 3 2 2 2 0 53  7 53 4 60000
    22 3 0 5 2 3 1 1 0 53  7 53 4 60000
    23 1 0 0 1 1 1 1 0 53  7 53 4 60000
    23 2 1 2 1 2 3 3 0 53  7 53 4 60000
    23 3 0 4 1 3 2 2 0 53  7 53 4 60000
    24 1 0 0 1 1 1 1 0 53  7 53 4 60000
    24 2 0 3 2 2 2 1 0 53  7 53 4 60000
    24 3 1 1 2 2 1 3 0 53  7 53 4 60000
    25 1 0 0 1 1 1 1 0 53  7 53 4 60000
    25 2 1 1 3 3 2 3 0 53  7 53 4 60000
    25 3 0 5 1 2 1 1 0 53  7 53 4 60000
    26 1 0 0 1 1 1 1 0 53  7 53 4 60000
    26 2 0 5 3 1 3 3 0 53  7 53 4 60000
    26 3 1 3 2 3 1 2 0 53  7 53 4 60000
    27 1 0 0 1 1 1 1 0 53  7 53 4 60000
    27 2 0 5 1 2 2 1 0 53  7 53 4 60000
    27 3 1 3 2 1 3 2 0 53  7 53 4 60000
    28 1 0 0 1 1 1 1 0 53  7 53 4 60000
    28 2 0 4 3 3 3 2 0 53  7 53 4 60000
    28 3 1 3 1 1 2 3 0 53  7 53 4 60000
    29 1 0 0 1 1 1 1 0 78  2 50 5 20000
    29 2 1 1 3 2 2 2 0 78  2 50 5 20000
    29 3 0 5 2 3 1 1 0 78  2 50 5 20000
    30 1 0 0 1 1 1 1 0 78  2 50 5 20000
    30 2 1 2 1 2 3 3 0 78  2 50 5 20000
    30 3 0 4 1 3 2 2 0 78  2 50 5 20000
    end
    I used the following codes and levels of nrep:

    Model 1:
    Code:
    mixlogit Choice Price ALT2* ALT3*, group(ID) rand($random) nrep(30) difficult robust
    No. of iterations: 8
    Log likelihood: -2055.1528
    Chi-square: 0.0000

    Model 2:
    Code:
    mixlogit Choice Price ALT2* ALT3*, group(ID) rand($random) nrep(90) difficult robust
    No. of iterations: 8
    Log likelihood: -2054.7891
    Chi-square: 0.0049


    where:
    Choice = dependent variable
    Price = additional cost of conserving the natural resource

    The model includes:
    *3 alternatives, represented as ALT, including the status quo (Alternative 1 as the base alternative)
    *6 Random variables (for the resource’s attributes), two of these are interaction variables
    *6 Case-specific variables (socio-economic variables of respondents). These were included in the model by creating categorical variables for the alternatives (ALT2 and ALT3) and creating interaction variables between the socio-economic variables and alternatives.

    nrep 30 and 90 seem to provide significant and consistent results (i.e. same significant variables and signs), whereas other levels resulted in endless iterations with not concave messages. Further, nrep>90 resulted in insignificant models, i.e. using nrep(300) resulted in a model with chi-square=0.6002.

    My questions are:
    1. Is there a recommended number of Halton draws (nrep#) for mixed logit? Based on the STATA Journal for mixlogit (https://www.sheffield.ac.uk/polopoly...e/mixlogit.pdf) the default is nrep(50). However, higher levels could give more accurate results.
    2. Is it acceptable to use either 30 or 90 for this analysis since it provided almost similar results?
    Thank you.
Working...
X