Announcement

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

  • gmnl G-MNL(uncorrelated) to account for scale heterogeneity

    Hello

    I am analysing a discrete choice experiment with a mixture model and no ASCs. I want to check if my data has scale heterogeneity via a generalized multinomial logit model (G-MNL) as described by Gu, Y., Hole, A. R., & Knox, S. (2013). Fitting the generalized multinomial logit model in Stata. The Stata Journal (Vol. 13). I think that the best model as described on p.396 is the
    G-MNL(uncorrelated) for my type of data (I deleted one of the linear terms of the mixture model so normally there is no correlation anymore among the mixture attributes).

    However, when I type the code:
    Code:
    gmnl chosen, rand(fpr fsec ftert mnopr mpr msec mtert fnopr_nch fpr_nch fsec_nch ftert_nch mnopr_nch mpr_nch msec_nch mtert_nch fnopr_nch2 fpr_nch2 fsec_nch2 ftert_nch2 mnopr_nch2 mpr_nch2 msec_nch2 mtert_nch2) group(choicecard) id(respondent)
    I got the following error code:
    Code:
    maximum dimension is 20
    r(3200);
    Does anyone knows how to solve this issue? My dataset is quite large (10224 rows) but I don't think that is the issue since I also tested to estimate the S-MNL on p.396 which did not result in an error message.

    Thank you very much in advance

    Kind regards

    Eva Boonaert

  • #2
    You can add -dtype(3)- as an option to your command line. By default, -gmnl- uses Mata's -halton()- function to make draws from the density of random coefficients, and the maximum number of Halton sequences that this function allows you to generate is 20. Your -rand(.)- option specifies more than 20 random coefficients, hence the error message. The option -dtype(3)- asks -gmnl- to use Mata's -uniform()- function instead, which allows you to generate more than 20 sequences of independent draws from the standard uniform distribution. You may find it useful to read Train's textbook chapter (https://eml.berkeley.edu/books/choic...9_p205-236.pdf) before running your next -gmnl- estimation.

    Comment


    • #3
      Hong Il Yoo thank you very much for your answer. Is it also possible to perform a scale adjusted or generalized latent class model (instead of a multinomial model) in Stata? I do not find a command for that.

      Thank you in advance

      Kind regards

      Eva

      Comment


      • #4
        You can look into -gllamm- (http://www.gllamm.org/) as well as Stata's native -fmm- command.

        Comment

        Working...
        X