Announcement

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

  • Using cmp command for non-recursive simultaneous equations model

    Hello everyone,

    I am using stata 14.0, and estimating a simultaneous equation model. have 2 equations as follows:

    Labor= f (Health, X1, X3) ; Probit
    Health= f (Labor, X2 , X3) ; Oprobit


    where,
    X1 is a set of exogenous variables that only affect Labor equation
    X2 is a set of exogenous variables that only affect Health equation
    X3 is a set of exogenous variables that affect three endogenous variables (Labor, and Health)

    Plus my data is an unbalance panel (including 8 waves)

    Can I apply cmp for this model since this is a nonrecursive model? Any help would be greatly appreciated.

    Thanks,
    Maryam

  • #2
    Hi Marian,
    There is a good chance that this model is actually logically inconsistent, i.e., mathematically impossible. See the discussion of this in my cmp paper.

    What you can do is make labor depend on the unobserved continuous health variable, and/or vice versa, like this:

    cmp (labor = health X1 X3) (health = labor# X2 X3) ind($cmp_probit $cmp_oprobit)
    cmp (labor = health# X1 X3) (health = labor X2 X3) ind($cmp_probit $cmp_oprobit)
    cmp (labor = health# X1 X3) (health = labor# X2 X3) ind($cmp_probit $cmp_oprobit)

    These are all allowed because aside from the # references (see cmp help file for discussion) the systems are recursive.

    Comment


    • #3
      Hi David,

      Thanks a lot to reply to my post. It was a great help. I read your paper "
      Stata module to implement conditional (recursive) mixed process estimator" plus "help cmp in Stata". I run the second cmp command that you suggested, and it worked. However, I want to clarify what I am doing in my research to make sure that I understood your explanation.

      Here is my model:

      (1): H*
      t= a1L*t + XH,t bH+ eh,t
      (2): L*t= a2H*t +
      XL,t bL+ eL,t
      (3): Ht= 0 (= poor) if m-1<
      H*t<m0
      =1
      (=fair ) if m0<H*t<m1
      =1 (=good ) if m1<H*t<m2
      =1 (=very good) if m2<H*t<m3
      =1 (=excellent) if m3<H*t<m4 where m-1, m0, m1, m2, m3, m4 are unobserved cut-off points to be estimated
      (4) Lt= 1 (if working)
      =0 (if not working)

      Where H*t : Latent true health
      L*t : Latent value of labor
      Ht : observed endogenous health (self-reported)
      Lt : observed endogenous labor

      Eqs. (1), (2), (3), and (4) constitute a simultaneous equation system. The parameters to be estimated are the structural coefficients a1 , a2 , bH , bL in Eqs. (1)-(4), and the cut-off points in Eq.(3), and the varience-covarience parameters.

      I'd like to see if I understood your point completely. Since H*is a latent continuous variable, can I apply your suggestion or not?

      I have used two stage least square method as a limited information maximum likelihood, and cmp as a full information maximum likelihood method.
      Please see the attachment for the estimation result.

      I just wanted to make sure I am doing the right estimation. Many thanks in advance.

      Maryam

      Attached Files
      Last edited by Maryam Bidgoli; 20 Jul 2016, 18:59.

      Comment


      • #4
        If you add the assumption that the error terms are bivariate normal, then that model is exactly the last one I wrote:

        cmp (labor = health# X1 X3) (health = labor# X2 X3), ind($cmp_probit $cmp_oprobit)
        Last edited by David Roodman; 20 Jul 2016, 19:23.

        Comment


        • #5
          David, Thanks a lot for the response. It worked out! Many thanks.

          Now I want to conduct Wald test of exogeneity of health variable. How can I do a postestimation test after cmp?

          Best,
          Maryam

          Comment


          • #6
            Wouldn't you just look at the coefficient on labor# in the health equation, which should be reported with a standard error, CI, and p value?

            That said, behind the scenes, the coefficients on the # variables are named gama_XX. If you want to get at them programmatically, type "mat list e(b)" and figure out which entry matches your coefficient of interest. Then if you needed you could do something like "test [gamma1_2]_cons".

            Comment


            • #7
              Thanks for your helpful post. The issue is that following Cai (2010) paper, I want to test the joint significance of the three parameters (Wald test of exogeneity); the coefficient on the labor force status variable (a1), the covariance of the time invariant error components and the correlation coefficient of the time-variant error components. Please see the following, which is the related part of Cai (2010) paper.

              Please see the attached.

              Do we have the covariance of the time variant and invariant error components in the output? I'm sorry if my question is simple.

              I greatly appreciate all your help.

              Best,
              Maryam
              Attached Files

              Comment


              • #8
                Well the model you listed above only shows a time dimension and does not specify an error structure. If you have a cross-section dimension and you want to fit with random effects, then do:

                Code:
                cmp (labor = health# X1 X3 || id:) (health = labor# X2 X3 || id:), ind($cmp_probit $cmp_oprobit) nolr
                where id is a variable that identifies individuals. By default, this will allow both the time-variant and time-invariant components to be correlated across the two equations, as Cai seems to do. In practice, that can be hard to fit, so you might try

                Code:
                cmp (labor = health# X1 X3 || id:) (health = labor# X2 X3 || id:), ind($cmp_probit $cmp_oprobit) nolr cov(independent unstructured)
                which will force the time-invariant random effects to be uncorrelated between the two equations.

                The hypothesis about endogeneity will then relate to the "gamma_..." parameter for the coefficient on labor# and to the "atanrho_..." parameters for the two levels in the error structure (unless you have forced one of those to be zero as a I just suggested. So, assuming you don't impose " cov(independent unstructured)", you would do something like:

                Code:
                test [gamma1_2]_cons [atanhrho_12]_cons [atanhrho_1_12]_cons

                Comment


                • #9
                  David, GREATLY appreciated. I tried the first code, and run the test. It worked! thanks.

                  Then I run margins for both equations. However, I get the result for oprobit model not for probit model. I read what you already posted about margins, and I used the option force but still no result. What would you recommend?

                  code: margins, dydx(*) predict(equation(health))
                  code: margins, dydx(*) predict(equation(labor))

                  Mant thanks,
                  Maryam

                  Comment


                  • #10
                    Maryam, I need you to be more precise. What do you mean, "no result"? Does the screen just remain blank?

                    Comment


                    • #11
                      You are right David. Sorry for the confusion. Please see the attached.

                      FYI, rwork is Labor equation.
                      Attached Files

                      Comment


                      • #12
                        Sorry I'm just going to add something. Does _cmp_ have any "standardized coefficient" option like "beta"? I tried it, it didn't work.
                        Sorry for asking many questions.

                        Comment


                        • #13
                          And did you also try the last suggestion in these lines from the help file?

                          "When using margins to estimate marginal effects for a cmp estimate, users may need to include the force and/or noestimcheck options in the margins command line,
                          because of a bug in some versions of margins. Also, in some cases cmp may first need to be run with the resultsform(reduced) option (see above) in order to
                          produce any results."

                          No cmp, doesn't offer beta coefficients, but you can always standardize your variables before running cmp.

                          Comment


                          • #14
                            I tried the following codes, and worked:

                            code:
                            • cmp (rwork = rshlt_# age rabplace married seperated kid18_ lesshighschool college collegemore whitecollar2_ bluecollar wealth midwest northeast west hispanic black rsmoke rdrink || hhidpn : (rshlt_ =rwork# age rabplace married seperated hispanic black midwest northeast west lesshighschool college collegemore whitecollar2_ bluecollar wealth rsmoke rdrink rconde || hhidpn : if (ragender==1 & age<65), ind($cmp_probit $cmp_oprobit) nolr cov(independent unstructured)
                            • cmp, resultsform(reduced)
                            • margins, dydx(*) predict(equation(rwork)) force noestimcheck
                            Is that correct?

                            Thanks a lot for all your help. I've learned a lot.

                            Comment


                            • #15
                              Hi,

                              For some reason I decided to run logit and ologit regression. The cmp command works for ($cmp_probit $cmp_oprobit) but not ($cmp_logit $cmp_ologit). Would you please help me with it.Many thanks.

                              Maryam

                              Comment

                              Working...
                              X