Announcement

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

  • How to run marginal effect for multinomial probit in STATA

    My dependent variable has four categories, including 1) working & studying; 2) working but not studying; 3) studying but not working; 4) not working and not studying. I use the command "mprobit" to run multinomial probit regression as follows:

    mprobit Work_studycross ib1.SEX ib1.Sex_HeadHH ib1.RE_SEC_head_nomissing ib1.Occu_headrecode ib1.Occuhighestnonheadrecodenochi ib3.Edu_head4groupsfinal ib4.EduhigestnonheadnochildeduFIN ib2.AREA ib0.Have_child0to14years ib1.Have_adult ib2.Family_disrupt ib2.TypeHH_relationtohead , baseoutcome (4)

    Then, I managed to obtain the table that has four sections which the first section is for Outcome 1 while the last section is for Outcome 4. This table has coefficient and standard error. So I try to use the command "mfx, predict(pr outcome(1))" as I want to obtain the table with marginal effect. However, the result is that there is no independent variables (as shown in the bold texts below). What does this mean? And what should I do to obtain mariginal effect for multinomial probit? (e.g., my command is wrong?)

    . mfx, predict(pr outcome(1))
    no independent variables
    r(102);


    (Note: I use the command "tab" to check the number of observations in the dependent variable, and I found that there are observations for all four categories of the dependent variables, i.e., category 1 = 374 observations, category 2 = 552 observations, category 3 = 6,666, and category 4 = 510 observations which cateogry no.4 is my baseoutcome (reference group). So I do not understand why the software said "no independent variables).

    Many thanks in advance for your advice
    Kanoknit
    Last edited by Kanoknit Tanjan; 05 Dec 2021, 10:40.

  • #2
    -mfx- is an old command that has been supplanted by -margins-. So unless you are using a rather ancient version of Stata, you should switch to using -margins-. Your -mprobit- command already uses factor variable notation, so you won't need to make any changes to that. To get marginal effects from -margins- you will need to use the -dydx()- option and specify which independent variables' marginal effects you wish to see. Bear in mind, also, that a -probit- model is non-linear, so marginal effects are not constants: they depend on the values of the independent variables themselves. So you will need to either specify the -at()- option in order to get marginal effects conditional on specific values, or -atmeans- to get marginal effects at mean values, or, if you specify neither of those, you will get average marginal effects (averaged over the joint distribution of the independent variables).

    Comment


    • #3
      Many thanks for your help -- indeed.. After putting the command "mprobit Y X1 X2.....,baseoutcome 4". I run the commmand "margins, dydx ( Sex_HeadHH) at ( Sex_HeadHH=1)" because I would like to get the marginal effect of the independent variable (Sex of Head of Household which the reference group for this variable is Code 1) on the children's schooling status (dependent variable). I got the follownig resutl. Please help confirm if this is correct.

      And may I ask for the follow-up questions
      1) Do I have to run marginal effect for each independent variable separately? Or can I put many independent variables in one command for their marginal effects at one time ? The thing is that I am not sure if I run each independent variable separately (one by one), the marginal effect value will be different from the running all independent variables altogether?



      Expression : Pr(Work_studycross==1), predict()

      dy/dx w.r.t. : 2.Sex_HeadHH

      at : Sex_HeadHH = 1




      ------------------------------------------------------------------------------

      | Delta-method

      | dy/dx Std. Err. z P>|z| [95% Conf. Interval]

      -------------+----------------------------------------------------------------

      2.Sex_HeadHH | .0045887 .0052649 0.87 0.383 -.0057303 .0149077

      ------------------------------------------------------------------------------


      2) My dependent varaible has four outcomes of the schooling status (e.g., Outcome 1 = work and study; Outcome 4 = not work and not study). And I specified the baseoutcome as "4" when I run mprobit. Then if I would like to get the marginal effect of the independent variable "Sex of Head of Household" for Outcome 1 ( work and study) as compared to Baseoutcome 4. I put the following command, but it does not work. Could you please advise what I should do?

      margins, dydx ( Sex_HeadHH ) at ( Sex_HeadHH=1) predict Outcome (1)
      option predict not allowed
      r(198);


      Many thanks again for your help. It is very helpful.
      Kanoknit
      Thailand
      Last edited by Kanoknit Tanjan; 06 Dec 2021, 17:28.

      Comment


      • #4
        What you show looks correct.

        If you were calculating the marginal effects of all of the explanatory variables at their means, or getting average marginal effects of all of them, then you could do them all at once by just listing all of them in the -dydx()- option. But if you have different -at()- values you want to evaluate the marginal effects of different variables at, then each has to be done separately.

        Comment


        • #5
          Dear Clyde,

          May I have one more quesiton?

          My dependent varaible has four outcomes of the schooling status (e.g., Outcome 1 = work and study; Outcome 4 = not work and not study). And I specified the baseoutcome as "4" when I run mprobit. Then if I would like to get the marginal effect of the independent variable "Sex of Head of Household" for Outcome 1 ( work and study) as compared to Baseoutcome 4. I put the following command, but it does not work. Could you please advise what command should I enter to compare the marginal effect for Outcome 1, Outcome 2 and Outcome 3 (if I have Outcome 4 as baseoutcome (reference group) ?

          margins, dydx ( Sex_HeadHH ) at ( Sex_HeadHH=1) predict Outcome (1)
          option predict not allowed
          r(198);

          Many many thanks
          Kanoknit

          Comment


          • #6
            First, you have a misunderstanding. There is no such thing as the marginal effect of outcome level X relative to outcome level Y. There are marginal effects for each outcome level--they are not relative to any other outcome level. If you specify no -predict()-outcome, you will get the marginal effects on all of the outcome levels. If you wish to focus on a particular outcome, you can do so by specifying the one you want in the -predict()- option; you just have to get the syntax right. To see only the marginal effect on, say, outcome level 2, you can specify the predict option as -predict(pr outcome(2))-.

            If you want to contrast the different marginal effects on the different outcome levels with each other, you can do that by adding the -pwcompare- option to the -margins- command. Perhaps this is what you had in mind?

            Comment

            Working...
            X