Announcement

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

  • eprobit margins: inconsistent estimation sample levels 0 and 1 of factor

    I am trying to diagnose the problem I reported here . I've reproduced the error outside of the mi environment, so am creating this new topic to reflect that fact.

    The error arises after:
    Code:
    svy: eprobit DEPVAR IVAR1 IVAR..., entreat(TREATMENT = IVAR..., nointeract)
    This command completes successfully and returns full results to eprobit. Then

    Code:
    margins, dydx(*) predict(pr)
    The error message is:
    inconsistent estimation sample levels 0 and 1 of factor IVARNAME

    Note that IVARNAME is one of the predictor variables in the entreat() clause to eprobit.

    Note also that this doesn't happen in all the imputations; the above happened, for example, after using
    Code:
    mi extract 1
    , but does not happen with
    Code:
    mi extract 0
    .

    Thanks for your insights!

  • #2
    More information: running the entreat() clause separately using
    Code:
    svy: probit TREATMENT IVAR...
    works fine and the margins are computed properly. It also works properly under the mi environment. So I believe whatever the problem is arises from the variables used in the endogenous treatment equation in eprobit.

    Comment

    Working...
    X