Announcement

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

  • error 2000 no observations

    Dear Statalists

    I hope you are well.

    I would like to ask please regarding the issue of "error 2000 no outcome = BNK_Ownership2_4 > 0 predicts data perfectly" I got it when I performed probit analysis as the following:

    probit App_ BK i.FST_EP_INTS i.FST_GRT i.FST_B i.FST_AFR i.FST_AD i.RE_LEN i.RE_ST i.PO_GEN i.PO_CIT i.PO_ED i.F_SEC i.F_AGE i.F_SIZE i.BNK_Ownership2_4


    I got the highlighted comment when I include the variable BNK_Ownership2_4 where it consists of 103 access to different commercial banks types and 197 firms have not accessed.

    what does that comment mean? and How to solve the problem please?

    Greatly appreciate your valuable inputs

    Thank you in advance

    Kind regards,
    Rabab

  • #2
    error 2000 no outcome = BNK_Ownership2_4 > 0 predicts data perfectly
    I have never seen an error message like that. I suspect that you have combined two different messages, one of which is a warning, not an error message, and that you have also mistyped the error message.

    The error message I think you got is:
    Code:
    no observations
    r(2000);
    You will get this in any regression command when the estimation sample doesn't contain any observations. Remember that in a regression command, the estimation sample excludes any observations containing a missing value on any variable mentioned in the model. Since you have, if I counted correctly, 15 variables in your model, it does not take a lot of scattered missing values in the data set to end up with every single observation containing a missing value somewhere among those variables. The solutions to this are to a) find more data, or b) find a reasonable way to impute values for the missings, or c) drop some variables that seem to have a lot of missing data from the model. (The -misstable summarize- command will help you quickly identify how many observations of each variable have missing values.) A less common way in which this same error message arises is if one of the variables in your model is actually a string variable. For some reason, rather than pointing that out directly, Stata treats the string variable as if it consistent entirely of missing values, so that there are then no usable observations.

    The other message I think you got probably said something like "BNK_Ownership2_4 > 0 predicts success perfectly" (or it might have said failure instead of success), and it was probably followed by another message telling you that BNK_Ownership2_4 was dropped from the model and that observations in which BNK_Ownership2_4 > 0 were omitted from the estimation sample. This is a problem that arises with logistic and probit regression models. These models are estimated by maximum likelihood. When you have a variable, like BNK_Ownership2_4 where some value or values of the variable are always associated with outcome == non-zero, or always associated with outcome == 0, the maximum likelihood estimate of the coefficients are infinite (or negative infinite) and there is no possibility that the estimation will converge. So Stata pre-empts that situation by checking for that kind of condition in advance and removing the offending variable and observations from the analysis. Note that this does not result in any loss of information in the results: you don't need a fancy model with coefficients to tell you what the outcome is when you have a value of BNK_Ownership2_4 > 0; that outcome is already known. So, in that sense, this isn't a problem at all and requires no solution. However, I recommend that you go back through your data management to verify that it really should be true that whenever BNK_Ownership2_4 > 0 you get only zero or only non-zero values of App_BK. If that isn't supposed to happen, then you need to repair the errors in your data.

    By the way, these two problems can interact with each other. It may be that in your overall data, there are observations with no missing values among any of the model variables. But it could happen that after the observations that have BNK_Ownership2_4 are removed, none of those observations remain, thus causing the error 2000.

    Comment


    • #3

      Dear Clyde

      Thank you very much for this information I will check data of the variable

      Kind regards,
      Rabab

      Comment

      Working...
      X