Announcement

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

  • Marginal Effects Table [Please Help]

    Hello all,

    I'm computing the marginal effects of a probit regression, like so:

    Code:
     
     probit PIP RD IRDS IPP CSM CSL NECD PG SVC margins, dydx(*)
    From which I get this table:
    Click image for larger version

Name:	Screenshot 2021-06-21 at 18.37.47.png
Views:	1
Size:	545.3 KB
ID:	1615630
    So far so good, but I want to export it to a word document. The goal is to have a table for the probit regression with the marginal effects, like this:
    Click image for larger version

Name:	Screenshot 2021-06-21 at 18.23.21.png
Views:	1
Size:	147.2 KB
ID:	1615631
    However, when I export the table using
    Code:
    outreg2 using "C:\Stata\vmonteiro\models\modelos.doc"
    This is what I get:
    Click image for larger version

Name:	Screenshot 2021-06-21 at 18.38.09.png
Views:	1
Size:	413.9 KB
ID:	1615632
    It may seem that it's correct, however this table that I get has completely differenttt values from the first table I showed. Basically outreg2 is overwritting the command for margins Because of this, it's litereally the same to do
    Code:
      
     probit PIP RD IRDS IPP CSM CSL NECD PG SVC margins, dydx(*) outreg2 using "C:\Stata\vmonteiro\models\modelos.doc"
    or
    Code:
      
     probit PIP RD IRDS IPP CSM CSL NECD PG SVC outreg2 using "C:\Stata\vmonteiro\models\modelos.doc"

    If anyone could help me out on this that'd be gratefully appreciated.

    Thank you so much,
    Manel

  • #2
    Given example 11 in the output of the help outreg2 command, adding the post option to the margins command
    Code:
    probit PIP RD IRDS IPP CSM CSL NECD PG SVC
    margins, dydx(*) post
    outreg2 using "C:\Stata\vmonteiro\models\modelos.doc"
    will have margins place its results in the returned estimates, so outreg2 will be able to find and report those results.

    Comment


    • #3
      Thank you for the reply William Lisowski , it worked!

      I have another question that you might be able to help me with if you have the time.

      In some models there are interactions between variables, like so:

      Code:
      probit PIP RD IRDS IPP CSM CSL PG SVC CO##c.ACAP
      margins, dydx(*) post
      outreg2 using "C:\Stata\vmonteiro\models\modelos.doc"
      My question is regarding the output:

      Click image for larger version

Name:	Screenshot 2021-06-22 at 22.18.20.png
Views:	1
Size:	185.0 KB
ID:	1615870




      I don't understand what "1.CO" means. What does the "1." exactly?

      Is it the same for the output to write ".1CO" or "CO##c.ACAP" ?

      Is the "1.CO" the output for the interaction between the variables CO and ACAP?


      Thank you so much once again.
      Manel

      Comment


      • #4
        See -help fvvarlist-. Typing

        Code:
        CO##c.ACAP
        is the same as typing

        Code:
        i.CO##c.ACAP
        which is also the same as typing

        Code:
        i.CO c.ACAP i.CO#c.ACAP
        That is, if you use the # notation, variables are treated as categorical by default unless you explicitly specify that they are continuous.

        If CO is coded 0/1, this is probably what you want anyway.
        -------------------------------------------
        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
          Incidentally, there are no marginal effects for interaction terms in Stata. Vince Wiggins explains why in

          https://www.stata.com/statalist/arch.../msg00293.html

          If you need some additional background on how the margins command works, see

          https://www3.nd.edu/~rwilliam/xsoc73994/Margins01.pdf
          -------------------------------------------
          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
            Hi Richard Williams , thank you for the reply.

            However, I'm still a bit confused.

            I still don't understand what "1.CO" means. What does the "1." exactly?

            Thank you

            Comment


            • #7
              CO is likely coded 0/1. 1.CO means 0 is being treated as the reference category. If, say, CO were coded 1/2, you would be seeing 2.CO instead. In effect, the 1 and 2 would be recoded to 0 and 1.

              Again, see

              Code:
              help fvvarlist
              and/or the margins handout I linked to. It is important to understand how factor variable notation works and how to use it correctly, especially if you use post-estimation commands like margins or have categorical variables with more than 2 categories (e.g. Religion, where 1 = Catholic, 2 = Protestant, 3 = Jewish, 4 = Muslim, 5 = Other)/
              -------------------------------------------
              Richard Williams, Notre Dame Dept of Sociology
              StataNow Version: 19.5 MP (2 processor)

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

              Comment


              • #8
                The question you repeated in post #6 suggests that you have not read the output of the help fvvarlist command, recommended in post #4, where the important tools of Stata's factor variable notation are explained. I would recommend clicking on the title at the top of the output to open in Acrobat the Stata User's Guide to section 11.4.3, where the introduction is presented in fuller detail.

                Stata supplies exceptionally good documentation that amply repays the time spent studying it. And to understand your margins commands you need to understand factor variable notation.

                Professor Williams is modest about the course material he has made available, and which has been often recommended on Statalist by many members to posters with questions similar to yours.

                As he suggested, you should study his overview of margins at https://www3.nd.edu/~rwilliam/xsoc73994/Margins01.pdf, with a more detailed paper in the Stata Journal at http://www.stata-journal.com/article...article=st0260. I'll also note that Margins01.pdf is followed by Margins02.pdf ... Margins05.pdf covering more specialized topics.

                And all five of these PDFs, and plenty more of use to someone learning about the analysis of categorical data such as yours, are linked to from https://www3.nd.edu/~rwilliam/xsoc73994/index.html - the material mentioned above is found in the section headed Interpreting results: Adjusted Predictions and Marginal effects.

                Comment


                • #9
                  Hi,

                  how to you report probit regression results? Do I have to use "margins" and is it the same as partial effects as some researchers write in their paper?

                  Comment

                  Working...
                  X