Announcement

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

  • #16
    Dear Joao

    yes, I can show.


    . predict fit, xb

    . gen fit2=fit^2

    . ppml value lgdpx lgdpi lgdppx lgdppi ldis landli landlx fit2, cluster( ldis)


    . test fit2=0

    ( 1) fit2 = 0

    chi2( 1) = 9.31
    Prob > chi2 = 0.0023


    Milad

    Comment


    • #17
      Dear Joao,

      I have an important question

      What is your suggestion for my research? PPML or OLS?????????

      Comment


      • #18
        Dear Milad,

        OLS cannot be a good choice; to start with it is estimated with only about 50% of the sample. So, I suggest that you still use ppml but try to improve the model by changing the specification including things such as common language and so on.

        Best of luck,

        Joao

        Comment


        • #19
          Thank you Joao.

          I will try to improve the model.

          Milad

          Comment


          • #20
            Dear Joao,

            I estimated gravity model with PPML (Fixed Effect). I used robust and cluster options.

            PPML dep var indep vars, robust cluster(...)

            I have two questions:


            1. should I check normality test?why?


            2. Should I check Heteroscedasticity test?why?


            Milad

            Comment


            • #21
              Hi Milad,

              I have answered your question here: http://www.statalist.org/forums/foru...pml-panel-data

              All the best,

              Joao

              Comment


              • #22
                Hello,

                I'm also observing a gravity model using a PPML and OLS and I would like to ask you for an advice. I'm observing a time series of 20 years and I would like to test if the distance coefficient have statistically significantly decreased between the beginning and the end of the observed time period. Would you please have any hint how to do so?

                Thank you very much!

                Adam

                Comment


                • #23
                  Dear Adam,

                  Do you have a time series or a panel? A bit more of information about your data would help.

                  Best wishes,

                  Joao

                  Comment


                  • #24
                    Dear Joao,

                    Thank you very much from your answer!

                    I have the data in a panel form (20 years, EU 27 countries, 10 sections of trade). Although, since I’m interested in observation of distance coefficient, I observe each year separately such as:

                    forval i=1995/2014 {
                    ppml depvar indepvar1 indepvar2 indepvarX if year==`i' , cluster (dist)
                    }

                    Observing the coefficient values visually shows its decline over time but I would like to statistically test its decrease.

                    Thank you very much for your time, Joao!

                    Best regards,

                    Adam

                    Comment


                    • #25
                      Dear Adam,

                      I am not a Stata expert, but check whether you can do that with -suest-. The old fashion way of doing it is to estimate the model with pairs of years and interact the regressors with a time dummy. Then you just need to check whether the interaction with distance is significant.

                      All the best,

                      Joao

                      Comment


                      • #26
                        Dear Joao,

                        Firstly, thank you for all your helpful advice on this forum. It has helped me enormously with my masters thesis.

                        Can I please ask a practical question about how to actually get stata to run ppml with time-varying fixed effects as you suggest in your work?

                        I have a dataset of bilateral trade for 12 years (each three years apart) for all countries with all countries. I am looking to compare the impact of an rta on trade versus the impact of membership of the EEA (I am from the UK).

                        Based on the do file from your log of gravity paper, I have drafted the following code to run the regression:

                        egen oyear = group(iso3_o year) // generates combinations of exporter and year
                        egen dyear = group(iso3_d year) // generates combinations of importer and year
                        xi, pre(F_1) i.oyear // creates dummy variables for exporter and year
                        xi, pre(F_2) i.dyear // creates dummy variables for importer and year
                        ppml value lgdp_o lgdp_d comcur rta gatt_both EEA_both F_*

                        Is this the right approach to running the regression? Sorry for asking, but given how long it takes to run the regression it promises to take me days more to work it out on my own!

                        My sincere thanks,
                        Louie

                        ps: as you suggested on another thread I have divided trade value by 1,000,000 to achieve convergence

                        Comment


                        • #27
                          Dear Louie,

                          You are asking the wrong person because I am not very good at manipulating data. Anyway, I believe that what you are doing is not correct and suggest the following:

                          Code:
                          xi i.iso3_o*i.year, noomit pre(F_1)
                          xi i.iso3_d*i.year, noomit pre(F_2)
                          ppml value comcur rta gatt_both EEA_both F_*
                          Maybe you can try this with a small sub-set of your data to see it works? Notice that I did not include the gdp variables because they are not identified with all these fixed effects.

                          All the best,

                          Joao

                          Comment


                          • #28
                            Dear Joao,

                            thank you very much for you advice!

                            Muito obrigado!

                            All the best,

                            Adam

                            Comment


                            • #29
                              My pleasure, Adam.

                              Joao

                              Comment


                              • #30
                                Thank you very much Joao!

                                Comment

                                Working...
                                X