Announcement

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

  • cmp command

    Dear,

    Now, I would like to investigated the mediation effect of A on B and C. There is potentially endogenous among A, B and C. Could I use cmp (B= A C X1) (C= A B X2), because I found that A could be affected by B and C as well, and afraid that the system does not cover that problem.
    Hope to have your help.

    Thanks

  • #2
    No, -cmp- does not cover this case, because what you have written is a fully simultaneous system. -cmp- deals with recursive/triangular systems.

    If you have enough instruments for the endogenous variables, -reg3- is appropriate for fully simultaneous systems.

    Comment


    • #3
      Thanks so much Joro Kolev. But my matters are (1) not enough instruments (2) C is binary, and (C= A B X2) needs to be done with probit. Could you help any suggestions pls?

      Comment


      • #4
        I am afraid you do not have many options, except to assume that your system is recursive/triangular.

        (B= A C X1) (C= A X2)

        there is no fully simultaneous probit in Stata, neither as a native nor as a user contributed command (to the best of my knowledge).


        Originally posted by Dang Le View Post
        Thanks so much Joro Kolev. But my matters are (1) not enough instruments (2) C is binary, and (C= A B X2) needs to be done with probit. Could you help any suggestions pls?

        Comment


        • #5
          Thank you so much Joro Kolev. I will try with the system again.

          Comment


          • #6
            Actually, cmp can fit this model. It can handle simultaneous systems as long as the references to censored variables such as C are recursive/triangular. This would be done with something like
            Code:
            cmp (B= A C X1) (C = A B# X2), ind($cmp_cont $cmp_probit)
            The key is the "#" symbol. In general, you use # to refer a latent predictor "behind" a variable that is modeled as censored, such as a probit. But since B is not censored, B# means the same things as B. However, adding the # tells cmp that this is a simultaneous system, so it can handle it properly.

            You could also do
            Code:
            cmp (B= A C# X1) (C = A B# X2), ind($cmp_cont $cmp_probit)
            But that is a different model. It says that B depends not on C as observed (binary), but on the linear linear predictor behind C.

            There are examples of simultaneous models in the help file. I added this functionality after writing the paper about cmp.

            What you cannot do is a full, simultaneous probit model:
            Code:
            cmp (B= A C X1) (C = A B X2), ind($cmp_probit $cmp_probit)
            That is logically impossible, as explained in the paper about cmp.

            Comment


            • #7
              Oh Thanks so much David. I read your paper on the Stata Journal.
              Yep, it would be cont and probit.
              Another in my question is concerned about A. Because A is potentially affected by B and C. So, I just employ the mentioned system or do I need to add anything more? Appreciating your help!

              Comment


              • #8
                In principle, you can add a third equation for that--an A equation, which expresses the dependence of A on B C. But in general you will need some kind of instrument. Exactly what you do depends on what variables you have and what you believe about them, so I can't tell you exactly what to do. But something like this might make sense:
                Code:
                 cmp (A = B# C# X3) (B= A C X1) (C = A B# X2), ind($cmp_cont $cmp_cont $cmp_probit)
                Notice that all the references to other endogenous variables that do not have a # together form a triangular recursive system: B = A C..., C = A... There is no circularity among them.

                Meanwhile, the # references are either to the linear predictor inside of the probit variable C (C#) or to the uncensored linear predictor B#, which is actually the same as B.
                Last edited by David Roodman; 27 Mar 2021, 20:53.

                Comment


                • #9
                  Thank you so much David. I will try with it. Your reply is really worth for me.
                  Best wishes,

                  Comment


                  • #10
                    I'm just picking up not his.

                    So let's say I have an instrument (Z) for a variable A, and I would like to analyse the mediation effect of A and B on C. I have a structure such that:

                    (1) Z -> A
                    (2) A(hat) B - > C
                    (3) A(hat) C - > B

                    What I really want to know is the impact of A and B on C (point (2) above), but the relationship between B and C is not unidirectional. How would I go about estimating this system? Is it possible?

                    Am I correct in thinking it would be:

                    Code:
                     cmp (C = A# B X3) (B = A# C X2) (A = Z X1), ind($cmp_cont $cmp_cont $cmp_cont)
                    Where the first set of parentheses above is what I really want to know.

                    Comment


                    • #11
                      The rule is that references to other equations that lack # suffixes must not be circular. Here I see B in the C equation and C in the B equation, so that won't work.
                      But since these equations are apparently all uncensored--I just see $cmp_cont in the ind() option--you can easily fix that by adding more # suffixes. It doesn't change the mathematical meaning but it matters to the cmp program. These should all work and give the same results (though I can't guarantee convergence):
                      Code:
                      cmp (C = A# B  X3) (B = A# C# X2) (A = Z X1), ind($cmp_cont $cmp_cont $cmp_cont)
                      cmp (C = A# B# X3) (B = A# C  X2) (A = Z X1), ind($cmp_cont $cmp_cont $cmp_cont)
                      cmp (C = A# B# X3) (B = A# C# X2) (A = Z X1), ind($cmp_cont $cmp_cont $cmp_cont)

                      Comment

                      Working...
                      X