Announcement

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

  • Var != 0 predicts failure perfectly

    I'm attempting to run a logit model on longitudinal data and am getting the message that one of my variables (a running total of months within a specific category; there are 10 categories) predicts failure perfectly. A number of observations are then excluded from the model and I get no estimation for the aforementioned variable. When I run a crosstab of the predictor variable and the binary outcome, however, it does not appear that it should predict failure perfectly.

    Can anyone tell me what's going on here? I've tried a number of different things to see if I can fix the problem, but I keep getting the same message. Using the asis option will yield an estimate, but it is far outside the range of the estimates seen in the other 9 categories and no standard error is given.

    Thanks.

  • #2
    see the following FAQ which may help (though not written for the long'l situation): http://www.stata.com/support/faqs/st...ion/index.html

    Comment


    • #3
      Thanks, Rich. I don't, however, believe the link really refers to my case. My variable is actually dropped from the model because it predicts failure perfectly, or so Stata says. It is not the case that I get a reasonable estimate with a completely determined message at the bottom of the output. In fact, I can only force the model to give me an estimate by using the -asis- option under logit. And it's only in that case that I get no standard errors.

      Comment


      • #4
        Hi David,
        So my question is if that variable is being used as a dummy (which has a larger probability of explaining perfectly the outcome) or as a pseudo continuous variable. I wonder if you would have the same problem if you use a crossection logit rather than panel logit. If you dont get the same problem, my guess is it does predict outcome perfectly, once you account for the panel component.
        Fernando

        Comment


        • #5
          Another possibility here is that although your crosstab of the predictor and outcome don't appear to support perfect prediction of failure, in the -logit- context, you may have perfect prediction conditional on non-missingness of all of the logistic model variables. Try the cross tab again with an if condition that restricts to those observations for which none of the logistic model variables are missing.

          Comment


          • #6
            Thanks, everyone. Problem solved.

            Comment


            • #7
              Hi David,

              I am facing a similar problem. If you don't mind, could you kindly share how you solved the problem?

              Thank you,
              Mohsin

              Comment


              • #8
                @Clyde Schechter

                I got a similar problem while using the following panel logistic regression. Specifically, i got following message.
                [QUOTE]
                [note: multiple positive outcomes within groups encountered.
                note: 1786 groups (10968 obs) dropped because of all positive or
                all negative outcomes./QUOTE]
                This is the regression command
                xtlogit f fm s r m l lo bi a ii num i.year, fe
                Although the regression gave results. however, i lost around 11000 observations, which is almost half of the data.
                How can i save these observations from being dropped?

                I also tried to use i.gvkey or made dummies through
                encode
                , however, got same results.

                Last edited by Asad Rind; 06 Feb 2019, 14:40.

                Comment


                • #9
                  How can i save these observations from being dropped?
                  You can't, and you shouldn't try to. In fixed-effects regressions you are trying to estimate the within group (or person or firm or whatever your panel variable is) association between predictors and outcomes. If you have a panel where the outcome variable never changes, then that panel provide no information at all about how changes in the predictor variables are associated with changes in the outcome--the outcome doesn't change!

                  Comment


                  • #10
                    Originally posted by Asad Rind View Post
                    How can i save these observations from being dropped?
                    You can't, at least in the context of fixed-effects / conditional logistic regression. There's no loss, anyway, as they don't contribute anything to the likelihood. Only those groups for which the response changes will do so.

                    Comment


                    • #11
                      Thanks a lot guys.

                      Comment

                      Working...
                      X