Announcement

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

  • Logistics Regression for Panel Data - Low Prediction

    Hello guys,

    This problem has troubled me for weeks. I have an economics dataset measures 9 macroeconomics indicators of 6 countries, over the time period of 234 months. The dependent variable is the occurrence of economic at time t crisis as 1 is crisis and 0 is none. I want to to get the probability of a crisis occurs given the data of 9 indicators, therefore, I use logistics regression for panel data. After declared the dataset to be time series, I ran like this:

    Code:
    . xtlogit CRISIS INFLATION RESIMP M2_GR CREDIT_GR TROP_GR, fe
    I tried both random effect and fixed effect. The first problem is the log likelihood is too low, around -600 and -700. The second problem is when I calculate the probability using
    Code:
    . predict P_CRISIS
    , the fixed effect returned very low value (0% to 1%), and the random effect returned negative probability.

    What confused me the most is, when I separated the data of each countries and ran common logistics regression, the result was really good. So I'm not sure what caused the bad result in panel data.

    Any advice would be appreciated!

  • #2
    What do you mean when you say that the log likelihood is "too low." What do you expect it to be? And why do you expect that? Indeed, why do you have any expectation at all about the value of the log likelihood?

    As for the results you are getting with your predict command, this is because you are misunderstanding how -predict- works after -xtlogit-.

    When run after -xtlogit, re-, -predict- calculates, by default, xb, the linear predictor. It does not calculate a predicted probability. So the negative values you are getting are probably quite appropriate. If you want the predicted probability, you have to specify the -pr- option.

    When run after -xtlogit, fe-, -predict- calculates, by default, prc1. This statistic is the probability, conditional on there being one and only one positive result within the panel, that this observation will be that one. This, too, is not a predicted probability of the outcome in the ordinary sense of the term. In fact, unlike after the random effects model, you cannot get a predicted probability following fixed effects logistic regression--it is not estimable from the model at all. Your options are more restricted. (And, in a recent thread, we have seen evidence that even the options available may not produce correct statistics.)

    For more information about how -predict- works after -xtlogit-, run -help xtlogit postestimation- and then click on the link for predict.

    Comment


    • #3
      Thank you so much sir for your clarification. So as the predict function needs to be customize, can I just simply put the coefficient from result into the function to get the probability?

      Comment


      • #4
        I don't understand your question. There are several coefficients in the output, one for each predictor. No one of them, by itself, is sufficient. Also, -predict- is a command, not a function, and I don't know what you mean when you speak of putting a coefficient into it.

        I do understand that you want to get predicted probabilities. Here is what you can, and cannot do:

        1. After random effects, you can get this by using the -predict- command with the -pr- option.

        2. After fixed effects, there is no way to get predicted probabilities. This is not a limitation of Stata. It is an inherent feature of fixed-effects logistic regression that calculating predicted probabilities is mathematically impossible. Stop trying--you're wasting your time.

        Comment

        Working...
        X