Announcement

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

  • Bivariate Ordered Probit Model: calculating marginal effects

    Hi

    I have a bivariate ordered probit model where each of the outcome variables take the values: 1, 2, 3
    I would like to calculate marginal effects but stata just comes with errors - how can I resolve this?

    Thanks

  • #2
    I dont think Stata has any official command for a bivariate order probit (perhaps eoprobit? is what you are looking at?)
    If you provide the code you are using, (with a simple example of what you trying to do, and the problem you get) may help to understand the problem and help.
    F

    Comment


    • #3
      I installed ssc install bioprobit and then was able to run bioprobit
      I am trying to find the impact of neighbourhood income inequality and deprivation (both continuous variables) on individual aspirations and subjective wellbeing (both grouped into categories of 1-3).

      Comment


      • #4
        Originally posted by Bella Rosie View Post
        I would like to calculate marginal effects but stata just comes with errors - how can I resolve this?
        I don't get any errors with -margins- after -bioprobit- (see below). What errors do you get?

        .ÿ
        .ÿversionÿ17.0

        .ÿ
        .ÿclearÿ*

        .ÿ
        .ÿsetÿseedÿ`=strreverse("1611136")'

        .ÿ
        .ÿquietlyÿsysuseÿauto

        .ÿsummarizeÿrep78,ÿmeanonly

        .ÿquietlyÿreplaceÿrep78ÿ=ÿruniformint(r(min),ÿr(max))ÿifÿmi(rep78)

        .ÿ
        .ÿegenÿbyteÿprcÿ=ÿcut(price),ÿgroup(3)

        .ÿ
        .ÿ*
        .ÿ*ÿBeginÿhere
        .ÿ*
        .ÿquietlyÿbioprobitÿ(rep78ÿheadroom)ÿ(prcÿgear_ratio)ÿ//ÿnolog

        .ÿbioprobit

        Seeminglyÿunrelatedÿbivariateÿorderedÿprobitÿregression

        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿ=ÿÿÿÿÿ74
        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿWaldÿchi2(1)ÿÿ=ÿÿÿ0.65
        Logÿlikelihoodÿ=ÿ-181.7885ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿÿÿ=ÿ0.4211

        ------------------------------------------------------------------------------
        ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿCoefficientÿÿStd.ÿerr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿconf.ÿinterval]
        -------------+----------------------------------------------------------------
        rep78ÿÿÿÿÿÿÿÿ|
        ÿÿÿÿheadroomÿ|ÿÿ-.1178082ÿÿÿ.1464401ÿÿÿÿ-0.80ÿÿÿ0.421ÿÿÿÿ-.4048255ÿÿÿÿ.1692091
        -------------+----------------------------------------------------------------
        prcÿÿÿÿÿÿÿÿÿÿ|
        ÿÿgear_ratioÿ|ÿÿ-.4489553ÿÿÿ.3068629ÿÿÿÿ-1.46ÿÿÿ0.143ÿÿÿÿ-1.050395ÿÿÿÿ.1524848
        -------------+----------------------------------------------------------------
        athrhoÿÿÿÿÿÿÿ|
        ÿÿÿÿÿÿÿ_consÿ|ÿÿÿ.0833027ÿÿÿ.1448358ÿÿÿÿÿ0.58ÿÿÿ0.565ÿÿÿÿ-.2005702ÿÿÿÿ.3671756
        -------------+----------------------------------------------------------------
        ÿÿÿÿÿÿ/cut11ÿ|ÿÿ-2.091293ÿÿÿ.5021672ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-3.075523ÿÿÿ-1.107063
        ÿÿÿÿÿÿ/cut12ÿ|ÿÿ-1.406849ÿÿÿ.4852262ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-2.357874ÿÿÿ-.4558227
        ÿÿÿÿÿÿ/cut13ÿ|ÿÿ-.1495497ÿÿÿ.4666788ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-1.064223ÿÿÿÿ.7651239
        ÿÿÿÿÿÿ/cut14ÿ|ÿÿÿ.6427963ÿÿÿ.4614825ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-.2616928ÿÿÿÿ1.547285
        ÿÿÿÿÿÿ/cut21ÿ|ÿÿ-1.816215ÿÿÿ.9426696ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-3.663814ÿÿÿÿÿ.031383
        ÿÿÿÿÿÿ/cut22ÿ|ÿÿ-.9296004ÿÿÿ.9356036ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-2.76335ÿÿÿÿÿ.904149
        -------------+----------------------------------------------------------------
        ÿÿÿÿÿÿÿÿÿrhoÿ|ÿÿÿ.0831105ÿÿÿ.1438353ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-.1979232ÿÿÿÿ.3515188
        ------------------------------------------------------------------------------
        LRÿtestÿofÿindep.ÿeqns.ÿ:ÿÿÿÿÿÿÿÿÿÿÿÿchi2(1)ÿ=ÿÿÿÿÿ0.33ÿÿÿProbÿ>ÿchi2ÿ=ÿ0.5655

        .ÿmarginsÿ,ÿdydx(headroom)ÿpredict(xb1)

        AverageÿmarginalÿeffectsÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿ=ÿ74
        ModelÿVCE:ÿOIM

        Expression:ÿlinearÿpredictionÿofÿrep78,ÿpredict(xb1)
        dy/dxÿwrt:ÿÿheadroom

        ------------------------------------------------------------------------------
        ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿÿÿÿÿÿDelta-method
        ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿdy/dxÿÿÿstd.ÿerr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿconf.ÿinterval]
        -------------+----------------------------------------------------------------
        ÿÿÿÿheadroomÿ|ÿÿ-.1178082ÿÿÿ.1464401ÿÿÿÿ-0.80ÿÿÿ0.421ÿÿÿÿ-.4048255ÿÿÿÿ.1692091
        ------------------------------------------------------------------------------

        .ÿmarginsÿ,ÿdydx(gear_ratio)ÿpredict(xb2)

        AverageÿmarginalÿeffectsÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿ=ÿ74
        ModelÿVCE:ÿOIM

        Expression:ÿlinearÿpredictionÿofÿprc,ÿpredict(xb2)
        dy/dxÿwrt:ÿÿgear_ratio

        ------------------------------------------------------------------------------
        ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿÿÿÿÿÿDelta-method
        ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿdy/dxÿÿÿstd.ÿerr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿconf.ÿinterval]
        -------------+----------------------------------------------------------------
        ÿÿgear_ratioÿ|ÿÿ-.4489553ÿÿÿ.3068629ÿÿÿÿ-1.46ÿÿÿ0.143ÿÿÿÿ-1.050395ÿÿÿÿ.1524848
        ------------------------------------------------------------------------------

        .ÿ
        .ÿexit

        endÿofÿdo-file


        .


        You can also fit bivariate ordered probit regression models with official Stata's -gsem-. See, for example, this post. The model fitted there includes a random effect, which you would omit in your case. -gsem- also supports -margins- as a postestimation command.

        Comment


        • #5
          Hi,

          there is the package bicop that handles bivariate ordered probit models, but it also doesn't allow margins as a postestimation command. If you are interested in the computation of marginal effects on specific probabilities, I would recommend a workaround using cmp.

          Here, a short example to compute the marginal effects on the joint probability Pr(y1 = 2, y2 = 3)
          Code:
          cmp (y1 = x1 x2 x3) (y2 = x3 x4 x5), ind(5 5)
          replace y1 = 2
          replace y2 = 3
          margins, dydx(*) expr(exp(predict(lnl))) force

          Comment

          Working...
          X