Announcement

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

  • Interpretation of fmlogit variables

    I am very new to stata and using Maarten Buis' -FMLOGIT- (SSC) to model proportions for four outcomes (proportions of orders filled through a specific shipping method). The solution uses one outcome as a base case, When interpreting coefficients of the independent variables, how is the base case treated? I am looking for effects of the independent variables on the proportions of the outcome. So how do I treat the base case?

  • #2
    The problem that fmlogit is designed to deal with is the prediction/explanation of multiple proportions that add up to one. Because of the constraint that the proportions add up to one, you cannot get k regression equations for k proportions. In your case k is 4. If you have predicted 3 proportions, then you already know the 4th; one minus the sum of the three predicted proportions. You can use dfmlogit (see help fmlogit postestimation) to get the marginal effects on the proportions
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Dear Maarten, I am using the fmlogit package to model proportions for 13 policies. Below the codes:

      fmlogit pp2 pp10 pp11 pp6 pp13 pp12 pp8 pp7 pp5 pp9 pp4 pp1 pp3, eta(female age1 age2 nocollege bachelor inc11 inc22 inc33 white afr_amer hispanic rep tea ind oth midwest northeast south foodstampsreceivingrightnow children )
      margins, dydx(*) predict(outcome(pp10))
      margins, dydx(*) predict(outcome(pp11))
      margins, dydx(*) predict(outcome(pp6))
      margins, dydx(*) predict(outcome(pp13))
      margins, dydx(*) predict(outcome(pp12))
      margins, dydx(*) predict(outcome(pp8))
      margins, dydx(*) predict(outcome(pp7))
      margins, dydx(*) predict(outcome(pp5))
      margins, dydx(*) predict(outcome(pp9))
      margins, dydx(*) predict(outcome(pp4))
      margins, dydx(*) predict(outcome(pp1))
      margins, dydx(*) predict(outcome(pp3))

      The model outcome does not report the Wald chi2. See below

      ML fit of fractional multinomial logit Number of obs = 1,056
      Wald chi2(233) = .
      Log pseudolikelihood = -2548.8916 Prob > chi2 = .

      Is that ok or does it imply mistakes in the codes/procedures? Thank you in adavance for any assistance you may provide.

      Comment


      • #4
        It implies a problem with your data, probably insufficient information to estimate the 216 parameters in your model.
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment


        • #5
          Thank you. I found the problem; an exploratory variable with only 6 data points. Thank you for the prompt reply.

          Comment


          • #6
            Hello,
            please, could you someone explain us how can we get average marginal effects after using "fmlogit" command. In the explanation part, dfmlogit command is suggested but, this command doesn't work with new version of Stata. I am so confused both in terms of codes and how to interpret them. I have checked many websites to find appropriate information but, only dfmlogit command is suggested. So, If some can explain to me how to get average marginal effects in fractional multinomial models to me, I really appreciate. Thanks in advance.

            Comment


            • #7
              Bilal, I just ran the example in the fmlogit help file using Stata 17 and it worked fine. Why don't you show us your code and output and the exact error message and we may be able to better advise you. It may just be that you've got a comma in the wrong place, but without seeing what you've actually done we can't advise you very well. Be sure to use code tags for your output. If you don't know how to do this, check the section in the Statalist FAQ on asking questions effectively.
              -------------------------------------------
              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
                Thanks for your quick response Dr. William. I really appreciate you. I will keep in my mind your suggestions for multiple posting.

                I am using stata version 16.1. By the way, I am applying survey weights while running the analysis.

                Code I am using:
                fmlogit grocery_ratio restaurant_ratio fastfood_ratio [pweight=hhwgt], eta( i.Race i.ortayas i.genc i.bachigh i.college i.highschool i.snapnowhh i.fakir1 i.fakir2 i.cocuk i.is commute mRFEI_halfmile i.sex i.yz i.ilkbhr i.snbhr i.mixedseason i.anyvehicle) cluster(tspsu).

                I attached what I obtained as outcomes in the message.

                then, I am applying the following code to get average marginal effects for example for my cocuk variable;

                dfmlogit at (cocuk 0 cocuk1)
                dfmlogit only exists for older versions of Stata
                use margins instead
                r(198);

                Stata gives error message.

                Also, Dr. William I am confused about how I should interpret my results. Do I need to talk about average marginal effects rather than coefficients and signs? Again, thank you so much.

                Attached Files

                Comment


                • #9
                  In the fmlogit help file, the example is

                  Code:
                      use http://fmwww.bc.edu/repec/bocode/c/citybudget.dta, clear
                  
                      fmlogit governing safety education recreation social urbanplanning, ///
                          eta(minorityleft noleft houseval popdens)
                  
                      dfmlogit, at(minorityleft 0 noleft 0 )
                  Notice that in the example, there is a comma immediately after dfmlogit. In your example you do not have a comma. See if adding a comma fixes the problem.
                  -------------------------------------------
                  Richard Williams, Notre Dame Dept of Sociology
                  StataNow Version: 19.5 MP (2 processor)

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

                  Comment


                  • #10
                    Thanks Dr. William for your answer. However, I tried your suggestions but it seems that it did not work. I don't know what I should do. The following the error message:

                    "dfmlogit, at (cocuk 0 cocuk 1)
                    dfmlogit only exists for older versions of Stata
                    use margins instead
                    r(198);"

                    Comment


                    • #11
                      Hmm. The fmlogit help is a little deceptive. The example it shows in the help is not the code it actually runs.

                      Instead, the example runs fmlogit_ex.ado, which gets installed with fmlogit. To see the code,

                      Code:
                      viewsource fmlogit_ex.ado
                      You'll see that it has fairly straightforward margins commands, like

                      Code:
                      margins, dydx(*) predict(outcome(governing))
                      margins, dydx(*) predict(outcome(safety))
                      etc., etc, etc.
                      That is, it runs code like you see in Post #3.

                      Maarten has a very good paper on the analysis of proportions at

                      https://methods.sagepub.com/foundati...of-proportions

                      If you can't get it for free, Maarten has a pre-publication version at

                      http://www.maartenbuis.nl/publications/prop.html

                      I suggest you read Maarten's paper and then write back if still confused.

                      -------------------------------------------
                      Richard Williams, Notre Dame Dept of Sociology
                      StataNow Version: 19.5 MP (2 processor)

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

                      Comment


                      • #12
                        Thanks Dr. William for your valuable suggestions. I will let you know after carefully read Dr. Buis's paper. Again, thanks.

                        Comment


                        • #13
                          Hi experts and researchers,

                          I am using interactive terms in my research and I need to understand how can I calculate marginal effect and standard errors after system GMM on STATA for Panel data?

                          I am working on a Panel data model. I want to measure the marginal effect of the variable X1 on Y and represent it on a graph with STATA. Here is the equation: Y= a + b1X1 + b2X2 + b3X1*X2.

                          I have found a paper that is similar to what I want to do. However, I still do not understand How the author has computed the marginal effect and standard error using these equations below using STATA Software and he also uses system GMM.

                          yit = αyit−1 + β1FDit + β2INSit + β3Xit + ηi + εi

                          the squared term is included in the model specification as follows:

                          yit = αyit−1 + β1FDit + β2FD2it + β2INSit + β3Xit + ηi + εit

                          this equation is extended to incorporate the interaction terms:

                          yit = αyit−1 + β1FDit + β2FD2it + β3INSit + β4(FDxINS)it + β5(FD2xINS)it + β4Xit + ηi + εit ... Eq. (4)

                          the margin effect for Eq. (4), the total effect of increasing y due to FD can be calculated

                          by examining the partial derivative of y, as follows:

                          ∂yit/∂FDit = β1 + 2β2FD + β4INS + 2β5FD x INS ... Eq. (5)

                          he computes the standard error in the case in which the
                          model is Eq. (4), the marginal effect is equal to Eq. (5). Using the covariance matrix, the variance (i.e., standard error) is computed as:

                          σ^2 ∂y/∂x= var(βˆ1) + 4FD2var(βˆ2) + INS2var(βˆ4) + 4FD2INS2var(βˆ5) + 4FDcov(βˆ1βˆ2) +2INScov(βˆ1βˆ4) + 4FDINScov(βˆ2βˆ4) + 4FDINScov(βˆ1βˆ5) + 8FD2INScov(βˆ2βˆ5) +4FDINS2cov(βˆ4βˆ5)

                          How can I get marginal effect results as he has done in the table below using Stata? What is the command of marginal effect to get mean, maximum and minimum as the author has got in the table below? Can you please explain to me how he did (when H
                          he said, below table 2) that the marginal effect values are computed using the financial development and institutions descriptive statistics in Table 1 .see pictures, please

                          I would be very grateful for any help


                          Click image for larger version

Name:	table 1.png
Views:	2
Size:	86.2 KB
ID:	1627481

                          Click image for larger version

Name:	marginal effect.png
Views:	2
Size:	155.5 KB
ID:	1627482


                          Thanks
                          Badiah

                          Comment


                          • #14
                            Hi Badiah. I suggest you start a new thread with a descriptive title, as (unless I am missing something) your post is unrelated to the current topic.
                            -------------------------------------------
                            Richard Williams, Notre Dame Dept of Sociology
                            StataNow Version: 19.5 MP (2 processor)

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

                            Comment

                            Working...
                            X