Announcement

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

  • lclogit and lclogitml help

    I have been struggling for a long time now to get the significance statistics for my latent class model using STATA and keep getting the following error:

    lclogitml
    sp_choice_d is not a 0/1 variable which equals 1 for the chosen alternative.
    r(450);

    I have gone over my data and my variable sp_choice_d is binary and only has 0/1 values. I have formatted my data according to "Practical Issues in Conducting a Discrete Choice Experiment" by Ryan et al. and am running out of ideas for what is causing the error message. I have installed Glamm, I get lclogit output, lclogitpr works fine, but these are all worthless without the lclogitml statistics.

    For reference, the following is the lclogit command I am using. I should also point out that I am using a three alternative choice question but tab sp_choice_d shows an even 2/3 distribution between 0 and 1 values (as it should).

    lclogit sp_choice_d asc_b asc_c res_ia res_ib er_ia er_ib sMarsh sGrass oyster cost, group(c_id) id(reference_id) nclasses(3) membership(coast_zone tax_OP govt_OP CC_NEGperc ///
    front none female own income age_sum house white yrs_es) seed(1234567890)


    Any ideas would be greatly appreciated!

    I have attached some of my model output for reference (ignore the lclogit model errors, these were just a test and have since been corrected) and a screenshot of my data format:
    Click image for larger version

Name:	Screen Shot 2015-11-10 at 12.16.26 PM.png
Views:	3
Size:	93.0 KB
ID:	1316484


    NOTE: asc_a and asc_b are alternative specific constants. The rest of my variables are not shown.




    Attached Files

  • #2
    Did you ever have this issue resolved? If so, do you mind sharing what the resolution was? Thank you!

    Comment


    • #3
      Removing choice sets with missing depvars did the trick for me.

      Best,
      KS

      Comment


      • #4
        Dear all,

        I am having a very similar problem. I checked the choice sets, but I have no missing values in the dependent variables. Does anybody solve this in a different way? Thank you very much!

        Comment


        • #5
          Try removing any choice set that has all 0's (that is each choice set should have at least one 1).

          A

          Comment


          • #6
            Dear all
            I thought it would be best to reply to this thread rather than start a new topic. I am having trouble getting the lclogitml command to run.
            I am trying to simply run the command with the train dta (so I know the dataset is correct).
            The lclogit runs alright but the lclogitml gives the following error:

            lclogitml, iterate(10)
            -gllamm- is initializing. This process may take a few minutes.
            unknown link() mlogit
            r(198);


            I have used both Stata 14 & 15.
            I may be doing something very silly, or I may have downloaded an older version of it?
            Any help is highly appreciated.
            Best wishes
            Christie

            Comment


            • #7
              Originally posted by Christina Siettou View Post
              Dear all
              I thought it would be best to reply to this thread rather than start a new topic. I am having trouble getting the lclogitml command to run.
              I am trying to simply run the command with the train dta (so I know the dataset is correct).
              The lclogit runs alright but the lclogitml gives the following error:

              lclogitml, iterate(10)
              -gllamm- is initializing. This process may take a few minutes.
              unknown link() mlogit
              r(198);


              I have used both Stata 14 & 15.
              I may be doing something very silly, or I may have downloaded an older version of it?
              Any help is highly appreciated.
              Best wishes
              Christie
              Reinstalled gllamm package - must have been a version issue. Problem resolved.

              Comment

              Working...
              X