Announcement

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

  • IV diagnostics using cmp

    I'm estimating an instrumental variables model using the user-generated command cmp.

    In other IV commands such as ivreg2, the Kleibergen-Paap rk (under-id), Hansen-J (over-id) and tests for exogeneity are easily obtained. However, I'm not sure how to obtain each of these after cmp.

    Can I simply use the test command to produce my F-statistics for the underidentification test, for example?

    Here's the main model code.

    Code:
    (fee = `X' endogvar) (selectvar = `select_eq') (endogvar = `X' `i.instruments')  , ind(selectvar $cmp_probit $cmp_cont) svy subpop(adult) qui
    Would the Kleibergen-Paap rk test be produced via the following?

    Code:
     test ([endogvar] 1.instrument 2.instrument 3.instrument)
    How would I estimate the endogeneity and overidentification tests? I'm working on the assumption my errors are heteroskedastic given survey-adjustment.

    Thanks for your time!

  • #2
    Those tests are defined for linear models only.

    If your model is overidentified, you can include a subset of instruments in the fee equation and test if they are jointly significant there... That would test for their validity.

    --David

    Comment


    • #3
      Thanks for your help David,

      How would I go about including a subset of instruments in the fee equation, given that my instrument is categorical? The instrument indicates Obesity Classes I, II, and III, with the base level 0 indicating non-obesity.

      I tried out something along the lines of:
      Code:
      (fee = `X' endogvar 2.instrument 3.instrument) (selectvar = `select_eq') (endogvar = `X' `i.instruments')  , ind(selectvar $cmp_probit $cmp_cont) svy subpop(adult) qui
      with the intention of following up with the test command. However, this predictably follows up with the message:

      too many base levels specified

      Error constructing parameter vector. Possible cause:
      The base for an indicator ("i.") variable has a different minimum value
      in the samples for different equations, so Stata's default choice for base/omitted dummy
      differs by equation. Fix: manually set a uniform base.
      E.g. to make the omitted case 2, prefix throughout with "ib2." instead of "i.".


      Obviously, including all levels of i.instrument in the fee equation would fail to instrument for my endogenous variable. How can I proceed from here?

      As a side note, thank you for your user-generated programme, it's an excellent contribution to the research community.

      Kind regards,
      Michael

      Comment


      • #4
        You can do the fix suggested in the message, like "i(2/3)b2.instrument". Or you can generate the dummies manually with "xi i.instrument" and then use them rather than the "i. ... " syntax.

        Comment

        Working...
        X