Announcement

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

  • Joao Santos Silva
    replied
    Dear Adam,

    Unfortunately, -ppml- is not compatible with factor variables. What you have to do is to create all the dummies yourself (for example using the -xi- command) and then run the model including the variables you created.

    Hope this helps,

    Joao

    Leave a comment:


  • Adam Markus
    replied
    Dear Joao,

    I am a PhD-student in Hungary and I am focusing on estimating border effects and Vinerian trade effects of EU accession in the Visegrad countries.

    I would like to run a gravity regression in Stata11 with the ppml estimator using three fixed effects: one for the importer country, one for the exporter country and one for the year. The following error message appears after I write the command:
    ppml xij lngdpi lngdpj lnpopi lnpopj lndistance adjij i.i i.j i.year
    factor variables and time-series operators not allowed

    Can you please give me some recommendation?

    Regards
    Adam Markus

    Leave a comment:


  • Louie Dane
    replied
    Thank you very much Joao!

    Leave a comment:


  • Joao Santos Silva
    replied
    My pleasure, Adam.

    Joao

    Leave a comment:


  • Adam Dob
    replied
    Dear Joao,

    thank you very much for you advice!

    Muito obrigado!

    All the best,

    Adam

    Leave a comment:


  • Joao Santos Silva
    replied
    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

    Leave a comment:


  • Louie Dane
    replied
    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

    Leave a comment:


  • Joao Santos Silva
    replied
    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

    Leave a comment:


  • Adam Dob
    replied
    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

    Leave a comment:


  • Joao Santos Silva
    replied
    Dear Adam,

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

    Best wishes,

    Joao

    Leave a comment:


  • Adam Dob
    replied
    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

    Leave a comment:


  • Joao Santos Silva
    replied
    Hi Milad,

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

    All the best,

    Joao

    Leave a comment:


  • Milad Aminizadeh
    replied
    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

    Leave a comment:


  • Milad Aminizadeh
    replied
    Thank you Joao.

    I will try to improve the model.

    Milad

    Leave a comment:


  • Joao Santos Silva
    replied
    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

    Leave a comment:

Working...
X