Announcement

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

  • What is meant by "ml command is unrecognized"?

    Is the problem with Data or the command? I need to run binary logit regression. Version is Stata 15.1.
    Attached Files

  • #2
    Rose:
    is your copy of Stata fully updated?
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Yes its is.
      Last edited by Rose Dennis; 07 Apr 2024, 12:03.

      Comment


      • #4
        It's difficult to know what is going on here. You could start by telling us more about the data. Try this

        Code:
        egen group = group(Q9 Q13 Q14), label 
        
        tab group
        and show us the results please.

        Comment


        • #5
          This is what I got:


          . tab group
          variable group not found
          r(111);

          Comment


          • #6
            You didn't do what I suggested then. You need to get a new variable group before you can tabulate it.

            Meanwhile #3 is alarming. Pirated versions of Stata are often corrupt and give bizarre errors, to say nothing of other aspects of using proprietary software without its being paid for.
            Last edited by Nick Cox; 07 Apr 2024, 11:38.

            Comment


            • #7
              Nick:
              There is no variable Q13 in my data so I altered your code a little and got this result
              Attached Files

              Comment


              • #8
                Sorry about mentioning Q13. Otherwise your display allows this test:


                Code:
                * Example generated by -dataex-. For more info, type help dataex
                clear
                input float freq byte(Q9 Q14 Q15)
                25 0 2 1
                26 0 2 2
                 1 0 4 2
                 1 1 2 2
                83 1 3 1
                25 1 3 2
                10 1 4 1
                 3 1 4 2
                end
                
                . logistic Q9 i.Q14 i.Q15 [fw=freq]
                note: 3.Q14 != 0 predicts success perfectly;
                      3.Q14 omitted and 2 obs not used.
                
                
                Logistic regression                                     Number of obs =     66
                                                                        LR chi2(2)    =  51.25
                                                                        Prob > chi2   = 0.0000
                Log likelihood = -8.4826648                             Pseudo R2     = 0.7513
                
                ------------------------------------------------------------------------------
                          Q9 | Odds ratio   Std. err.      z    P>|z|     [95% conf. interval]
                -------------+----------------------------------------------------------------
                         Q14 |
                          3  |          1  (empty)
                          4  |   621.6726    901.493     4.44   0.000     36.24322    10663.43
                             |
                       2.Q15 |   .5933505   .8818974    -0.35   0.725     .0322233    10.92579
                       _cons |   .0248879   .0290885    -3.16   0.002     .0025184    .2459559
                ------------------------------------------------------------------------------
                Note: _cons estimates baseline odds.
                
                .

                I am presuming that Q14 and Q15 are categorical. In your case you should try


                Code:
                logistic Q9 i.Q14 i.Q15 
                if you don't get the results above, my guess is that the copy of Stata you're using is corrupt.

                Comment

                Working...
                X