Announcement

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

  • Using CMP command for three stage least squares with continuous and binary variables as dependent variables

    I am new to the cmp command, and I am not sure how to use it in Stata, given that outcome variables may differ, and each equation correct for a different selection bias... Below is the model I would like to estimate:

    SE = a1 + b1(individual-level controls) + c1(household-level controls) + d1(location-level controls) + e1(ZSE) + f1(BS) + g1(R) + errors1 (SE is binary)

    BS = a2 + b2(Individual-level controls) + c2(ZBS) + d2(R) + errors2 (BS is continuous)

    R = a3 + b3(Individual-level controls) + c3(ZR) + errors3 (R is binary)

    Given the structure of this model, I thought the best would be to use Stata's cmp command, is this correct?

    cmp (se = r bs $individual $household $location $zse) (bs = r $individual zbs) (r = $individual zr), ind($cmp_probit $cmp_cont $cmp_probit)

    Would this be the correct code?

    I then would like to obtain average marginal effects of these different equations:

    margins, dydx(*) force

    Would this be correct?

    Eventually, I would like to compute the full effect of R on SE, that is dSE/dR = dSE/dR + dBS/dR

    To do so, should I compute:

    f1*d2 + g1

    Or

    AME of f1*AME of d2 + AME of g1?


    Thanks a lot for your help.
    Last edited by Clotilde Mahe; 30 Aug 2016, 08:49.

  • #2
    Clotilde, the cmp command line looks right.

    Working with margins gets tricky. Since cmp is designed to work with various kinds of outcomes (binary, continuous, etc.), and the outcome type can even vary by observation, when you run predict or margins after it, it always defaults to producing the linear predictions (xb). If you want marginal effects for probabilities, you'll need to specify predict(pr). This is explained in the help file's "On predict and margins after cmp" section.

    In general, margins isn't good at understanding the relationships between equations in multi-equation models. You may be able to get it to compute margins for the exact expression you need via its expression() option, which lets you supply arbitrary mathematical expressions in the parameters, e.g., expression([se]bs * [bs]r + [se]r).

    --David

    Comment


    • #3
      Dear David,

      Thank you so much for your reply!

      I have a question about the -cmp- command - as I have been scrolling through Stata list posts, I have got a bit confused... based on the model I wrote, I am using -cmp- to deal with endogeneity of two variables (R and BS) with my outcome of interest (SE), one (BS) depending as well from the other (R).

      Is this similar to running -reg3- via 3SLS?

      If yes, i guess there is something I am not doing well, as I obtain very different coefficient estimates. I understand that there may be some differences because -cmp- allows to specify dependent variables as binary, continuous, etc., but I am a bit skeptical...

      Comment


      • #4
        There certainly are similarities, but as far as I know reg3 is not designed to handle a three-stage model like yours.

        Comment


        • #5
          Thanks a lot for your help, David!

          Comment


          • #6
            The other option would be a SEM or GSEM estimator. I don't know if margins works more easily with them than cmp.

            Comment


            • #7
              Thank you very much, Phil. I actually made an error in the model, and the GSEM estimator seems more relevant.

              Comment


              • #8
                hello. please i need assistance on how i can run triple hurdle model on stata 12. i am working on health expenditures of rural households in Nigeria. my hurdle model includes four decision stages- 1Probability of reporting illness (Probit) 2. probability of seeking for treatment (probit) 3. probability of incurring positive medical expenditure (Probit)and 4. the actual medical expenditure of respondents (OLS). please how do i run this analysis using stata 12. please note i will be using the same set of explanatory variables for all the stages. thanks for your prompt response.

                Comment


                • #9
                  i am still waiting for your response

                  Comment

                  Working...
                  X