Announcement

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

  • Trouble concluding Likelihood ratio test because of missing data

    Dear Colleagues. I am using stata’s post estimation command to calculate likelihood ratio.
    When I got to the final stage using “ lrtest m1 m2” , I got this response “observations differ: 19298 vs. 20127”
    Yes, some of the variables in the expanded model have missing data. Please how can I circumvent this hurdle to be able to compare the 2 models..
    Thanks .

  • #2
    You should run the expanded model first, then run the restricted model on exactly the same observations. Something like the following untested code:
    Code:
    regress y x1 x2 x3
    estimates save m1
    regress y x1 x2 if e(sample)
    estimates save m2
    lrtest m1 m2

    Comment


    • #3
      You can also try

      Code:
      lrtest m1 m2, force

      Comment


      • #4
        The likelihood ratio isn't supported if the models don't have exactly the same observations. The solution in #2 is safe, statistically.speaking. #3 may be useful in limited, advanced scenarios.

        Comment


        • #5
          Thank you so much everyone. Both worked! and what is amazing is that the assumptions also got automatically adjusted once I moved from on #2 to #3. With #2 I ran the expanded model first. With # 3 , I ran the restricted model first.
          Thanks again everyone.

          Comment


          • #6
            Originally posted by Oluyemisi Akinwande View Post
            Thank you so much everyone. Both worked! and what is amazing is that the assumptions also got automatically adjusted once I moved from on #2 to #3. With #2 I ran the expanded model first. With # 3 , I ran the restricted model first.
            Thanks again everyone.
            Everything that ends well is good, but just to point out that the problem here is not the order in which you fit the models. The problem is the different samples on which the estimation is carried out.

            Comment


            • #7
              OK. noted with thanks

              Comment

              Working...
              X