Announcement

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

  • Bivariate ordered probit : marginal effect using bioprobit

    Dear Stata users,

    I regress a Bivariate ordered probit using bioprobit. I try to compute the effect of part-time employment on academic achievement. My rygression is :
    bioprobit(Wintg=x1 x2 x3 w1 etc.) (result=x1 x2 x3 etc. Wintg1 Wintg2)

    My focus is on Wintg1 and Wintg2, with Wintg1=1 if the student worked less than 15 hours/week and Wintg1=1 if the student worked more than 15 hours/week. A student who worked 0 hour/week has Wintg1=0 and Wintg2=0. However, so far I've failed to compute the part-time marginal affect of Wint1 and Wintg2 using the comma margins (for example, margin dy/dx(Wintg1 Wintg2) entails Warning: cannot perform check for estimable functions. variable dy not found). Can you give me a comma which will work ? Any comment will be welcomed

    I hope someone will help me,

    Thank you in advance

  • #2
    If that is what you actually typed that is not the correct syntax. Assuming you have Stata 14, see

    Code:
    help biprobit_postestimation##margins
    Here are the examples from the help:

    Setup
    . webuse school
    . biprobit private vote logptax loginc years

    Predicted probability private = 1 and vote = 1
    . predict both1

    Predicted probability private = 1 and vote = 0
    . predict prob10, p10

    Predicted probability private = 1 given vote = 1
    . predict priv_given_vote, pcond1

    Test whether the coefficients are equal across equations
    . test [private=vote]: logptax loginc years

    Test whether the coefficients on years are jointly 0 across equations
    . test [private]years = 0, notest
    . test [vote]years = 0, accumulate

    Compute marginal effects of logptax and loginc on the conditional probability Pr(vote = 1|private = 1) at the regressors' means
    . margins, predict(pcond2) dydx(logptax loginc) atmeans
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    StataNow Version: 19.5 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment


    • #3
      Thank you for your answer !

      So far, I've tried several syntax using the biprobit help. However, it seems that bioprobit can't support the same options (for example, margins, predict p1(outcome(.,3)) dydx(Wintg1 Wintg2) atmeans yields "Warning: cannot perform check for estimable functions. option pcond2 not allowed" ; an other example : margins, predict(pr11) dydx(Wintg1 Wintg2) atmeans produces "Warning: cannot perform check for estimable functions. option pr11 not allowed" etc.).

      I've tried with outcome and it failed too ("margins, predict(outcome(.,3)) dydx(Wintg1 Wintg2) atmeans", "margins, predict(p1, outcome(.,3)) dydx(Wintg1 Wintg2) atmeans" etc.).

      In its article Sajaia didn't introduce any post estimation commands : he computes marginal effect manually...I wonder if that comma supports post estimation like biprobit does.















      Comment


      • #4
        What version of Stata do you have? Stata 14 does a better job of documenting the margins options and may have options that earlier versions of Stata did not have.

        Whatever version of Stata you have, use -update all- to make sure it is up to data. If problems persist, show us your code and output, including for the biprobit command itself. Use code tags. See pt. 12 of the FAQ.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 19.5 MP (2 processor)

        EMAIL: [email protected]
        WWW: https://www3.nd.edu/~rwilliam

        Comment


        • #5
          I just realized that I was misreading your question. You are asking about bioprobit, a user-written command, not biprobit, an official Stata command. Sorry about that!

          bioprobit dates back to 2008 and I don't think the margins command even existed then. So, bioprobit probably isn't designed to support the options you want.

          Any chance you could just dichotomize your variables and use biprobit? You would have a lot more options then.

          If you are both determined and clever, you might be able to use the expression option in margins to get what you want. Or you could try to write a predict command for bioprobit, but that may be a lot of work.
          -------------------------------------------
          Richard Williams, Notre Dame Dept of Sociology
          StataNow Version: 19.5 MP (2 processor)

          EMAIL: [email protected]
          WWW: https://www3.nd.edu/~rwilliam

          Comment


          • #6
            I use STATA 13.1.
            Yes, I think bioprobit can't do what I want to do (as I noticed in my second post. Maybe cmp (user-written command) can do it ? However the syntax seems awfull.


            Using cmp, my regression in STATA is :
            Code:
            *cmp(Wintg=ib4.form1 i.suite i.projetpr i.interet ib1.retard ib2.mention i.diffs i.diffp i.sexe ib1.seriebac unemp i.paris i.diffM i.PCSsupf i.PCSsupf#c.unemp) (result=ib4.form1 i.suite i.projetpr i.interet ib1.retard ib2.mention i.diffs i.diffp i.sexe ib1.seriebac ib0.Wintg)[aweight=poids1], indicators(5 5) quiet
            They are all discrete variables except unemp and unempcs (which is equal to i.PCSsupf#c.unemp). form1 takes 11 values (1 to 11), Wintg takes 3 values (0 to 2), mention takes 5 values (1 to 5), retard takes 3 values (1 to 3)

            I've made several tests.

            Code:
            margins, dydx(*) predict(outcome(1))
            Works very weel bu it's for my 1st equation. I'd like to compute it for my second one.
            However, when I try
            Code:
            margins, dydx(*) predict(outcome(1) eq(Wintg) pr)
            I have a table with only points (.) for coeff and "not estimable" for my std.error.

            I think the issue comes from my syntax (perhaps I need to add a "cond" somewhere). I don't think it comes from my data (because it works for the first equation).

            Thank you for your time.
            Last edited by Noemie Mallejac; 17 Apr 2016, 01:15.

            Comment


            • #7
              Hello Noemie,

              I am facing the same issue with margins after running bioprobit. I was wondering if anybody has a work around for this.

              Thank you.

              Comment

              Working...
              X