Comments (6)
Dear Zhanyu,
thanks for the message.
Could you please provide some additional details (like, a MWE to make the issue reproducible on my system, possibly any detail on the system you are running on - R version, Rstudio version if any, windows/Linux/Mac etc.) in order for me to try to tackle the issue?
Thanks,
Gabriele
from prodest.
Dear Gabriele,
Thank you for your reply.
I run the package (the latest version) on Stata 14.0 on the Windows system. For example, I just run the following example code provided in your help files:
insheet using "https://raw.githubusercontent.com/GabrieleRovigatti/prodest/master/stata/data/prodest.csv", names clear
prodest log_y, free(log_lab1 log_lab2) state(log_k) proxy(log_investment) va met(op) acf opt(nm) reps(50) id(id) t(year) /* run twince */
prodest log_y, free(log_lab1 log_lab2) state(log_k) proxy(log_investment) va met(op) acf opt(nm) reps(30) id(id) t(year)
then you will see different results.
Thanks,
Zhanyu
from prodest.
Dear Zhanyu,
thanks for the message and the clarifications.
The issue you outlined with the acf models' estimation is pretty well-known (you might find a section in my paper regarding it and a relatively new paper dealing with the topic on the Journal of Applied Econometrics). It has to do with the optimization of the second stage - which is a non-linear GMM problem - and the starting points of the optimizer. It is true that - in general - such an issue would primarily affect the estimation of the standard errors during the bootstrap repetitions, but in particular cases the starting points might affect local maxima in different points of the parameter space, and give different optimization results.
A possible solution would be to set the seed before running the estimation.
I hope to have clarified,
from prodest.
Dear Gabriele,
Thank you for your reply.
Firstly, I tried to use your seed() option, but it reported the error "option seed() not allowed". I opened your ado file but found that you did not set the seed option in -prodest-, then I manually set the seed (-set the seed #- before running the estimation ) but still got the different results.
Secondly, my understanding is that at the first stage, you obtain starting points from a simple OLS at the first stage. If there is no any other randomness, we will have the same/consistent starting points through the OLS estimation, and thus, the estimated coefficients will not be changed no matter what optimization method we use. But I can still see the different estimated coefficients. Please inform me if I am wrong. Thanks.
Best regards,
Zhanyu
from prodest.
Dear Zhanyu,
I have discontinued the option seed() in prodest. What I was suggesting was to add "set seed " before running every estimation, in a way that every run of prodest runs on the same seed number.
Let me clarify on the first-stage / second-stage question: you rightfully outline that the first stage is a simple OLS estimation, but as you might know the ACF correction consists exactly in overcoming the first-stage results, and only rely on the second-stage results, also for the free variable parameter. In a nutshell, then, without acf correction you could run into the same issue, but for the state and proxy variables only.
To a more "official" side, I will close the issue because - on my system, at least - the following works and gives the same results every time
insheet using "https://raw.githubusercontent.com/GabrieleRovigatti/prodest/master/stata/data/prodest.csv", names clear
set seed 101
prodest log_y, free(log_lab1 log_lab2) state(log_k) proxy(log_investment) va met(op) acf opt(nm) reps(50) id(id) t(year)
set seed 101
prodest log_y, free(log_lab1 log_lab2) state(log_k) proxy(log_investment) va met(op) acf opt(nm) reps(50) id(id) t(year)
whereas, for different results in different rounds of estimation in the acf framework, please refer to my paper here.
Best,
Gabriele
from prodest.
Ok, thank you again for your reply. Hope to see your name on the AER in the near future :)
Best regards,
Zhanyu
from prodest.
Related Issues (18)
- License HOT 2
- Add installation description HOT 1
- Example HOT 1
- Add community guidelines HOT 1
- Option Fsresidual not working with methods other than OP or LP HOT 1
- Industry fixed effects HOT 1
- Sampling weights option HOT 1
- Gross output vs. value added HOT 2
- Control variables with ACF correction error HOT 1
- 2-Step Optimal GMM HOT 3
- Omega estimates from WRDG_GMM HOT 1
- Error when idvar is a string (R) HOT 1
- Is there a way to export the results? R.
- Chilean data has same values for "cX" and "inv"
- nominal (current prices) or real (constant prices) with markupest
- FSres does not work HOT 2
- Questions about parallel computing HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prodest.