Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Benjamin Villena <b_villena@yahoo.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: Trouble using - estimates store- (new inquiry) |
Date | Sun, 19 May 2013 22:07:46 -0700 (PDT) |
Dear Federico, I appreciate your help. What you suggested worked, but it generated an unexpected side-effect When I tried to use my code using bootstrap, I got the following error something required r(100) Since this was the only change I made, I tried deleting the line you suggested in my ado file, and my bootstrap estimation worked! I could even store my estimates using -estimates store basemodel- Looking at the ereturn list, I realized that the bootstrap assigns e(cmd) : "bootstrap" It seems that there is a conflict using -ereturn local cmd "thenameofyouradofile"- when my ado file is used for bootstrap. Many commands attach their names to e(cmd), with no conflict if they are bootstrapped... I do not know how to do this. How can I set this right so I can store estimates when I use my ado file both (i) in a regular way and (ii) in a bootstrap? Thanks >________________________________ > From: Federico Belotti <f.belotti@gmail.com> >To: statalist@hsphsun2.harvard.edu >Sent: Sunday, May 19, 2013 12:22 PM >Subject: Re: st: Trouble using - estimates store- > > >Try to store the command name, that is include in your ado file > >ereturn local cmd "thenameofyouradofile" > >this should be enough to ensure that -estimates store- works. > >HTH, >Federico > >On May 19, 2013, at 12:01 AM, Benjamin Villena wrote: > >> Dear Statalist members, >> >> I wrote an ado file that does the following: >> (1) It transforms variables in a particular way, say compute X1=G(X) where X is the original variable >> (2) It estimates a model using a user-written package (cmp) with the transformed variables X1 >> The code works fine. It stores coefficients and variance matrix into e(b) and e(V)... ereturn list shows the estimated values are preserved. But if I try -estimates store equation1- I get the following error >> >> last estimation results not found, nothing to store >> r(301) >> >> I do not get it, how does Stata recognize there are estimates in memory? I believed that having e(b) and e(V) would be enough, but apparently is not. What am I missing here? >> >> Thanks >> >> Benjamin >> >> * >> * For searches and help try: >> * http://www.stata.com/help.cgi?search >> * http://www.stata.com/support/faqs/resources/statalist-faq/ >> * http://www.ats.ucla.edu/stat/stata/ > >-- >Federico Belotti, PhD >Research Fellow >Centre for Economics and International Studies >University of Rome Tor Vergata >tel/fax: +39 06 7259 5627 >e-mail: federico.belotti@uniroma2.it >web: http://www.econometrics.it > > >* >* For searches and help try: >* http://www.stata.com/help.cgi?search >* http://www.stata.com/support/faqs/resources/statalist-faq/ >* http://www.ats.ucla.edu/stat/stata/ > > > * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/