Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: bootstrap error - dynamic panel probit


From   Austin Nichols <[email protected]>
To   [email protected]
Subject   Re: st: bootstrap error - dynamic panel probit
Date   Wed, 11 May 2011 12:28:32 -0400

Federica <[email protected]>:
I am not going to go through your program line by line, but at a
minimum you need to start with something like

cap g newid=id
xtset newid year

instead of

xtset id  year

or why else are you resampling clusters?

On Wed, May 11, 2011 at 12:20 PM, Liberini, Federica
<[email protected]> wrote:
> Hello, thanks for your reply.
> I did not show the program because, as I said, the program works on some dataset and doesn't on others. Also the commands in the program run outside of the program.
> Could it be the xtprobit regression included in the program the one giving troubles?
>
> I tried setting the trace on, but the output is very difficult to interpret (very very long).
> I'll try run the bootstrap noisily now.
> Any other suggestion?
>
> Many thanks
> Federica
>
>
> The following, is my entire code:
>
> My program is:
>
> program APEdisc_boot, rclass
> xtset id  year
>                * xtset the data
>
>                *estimate dynamic probit
>                #delimit ;
>                        xtprobit choice lagchoice
>                                         var1
>                                         choicezero  var1bar, re from(b) ;
>                #delimit cr
>                predict double xdh, xb
>                                * double option for maximum precision
>                gen double xdh0 = xdh - _b[lagchoice]*lagchoice
>                gen double xdh1 = xdh0 + _b[lagchoice]
>                replace xdh0 = xdh0 / sqrt(1+e(sigma_u)^2)
>                replace xdh1 = xdh1 / sqrt(1+e(sigma_u)^2)
>                gen double pe1 = normal(xdh1) - normal(xdh0)
>                summarize pe1, meanonly
>                return scalar ape_lagy=r(mean)
>                drop xdh xdh0 xdh1 pe1
> end
> #delimit ;
>        xtprobit choice lagchoice
>                        var1
>                        choicezero  var1bar, re ;
> #delimit cr
> mat b=e(b)
>
> * Bootstrap within firms
> tsset, clear
> bootstrap r(ape_lagy), saving(ape_discr) reps(10) seed(123) cluster(id) idcluster(newid): APEdisc_boot
> xtset id  year
>
> program drop APEdisc_boot
>
>
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Austin Nichols
> Sent: 11 May 2011 17:10
> To: [email protected]
> Subject: Re: st: bootstrap error - dynamic panel probit
>
> Federica <[email protected]>:
> Presumably the problem is in your program, which you don't show.
> Start with -set trace on-.
> Have you seen Wooldridge's materials at
> http://www.stata.com/meeting/snasug08/abstracts.html
> (scroll down)?
>
> On Wed, May 11, 2011 at 10:53 AM, Liberini, Federica
> <[email protected]> wrote:
>> I am trying to estimate the APE from a dynamic panel probit model using
>> Wooldridge's Method. When I try to bootstrap over the estimated APEs to
>> simulate their SE, I get
>>
>> . bootstrap r(ape_tax), reps(10) seed(123) cluster(id) idcluster(newid):
>> APEcont_boot
>> (running APEcont_boot on estimation sample)
>>
>> Bootstrap replications (10)
>> ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
>>   xxxxxxxxxx
>> insufficient observations to compute bootstrap standard errors
>> no results will be saved
>> r(2000);
>>
>> please note: the program APEcont_boot is a program I wrote to estimate
>> the APE. The program's routine works perfectly outside of the program,
>> even when called twice in a row (there are no -generate-ed and
>> un-drop-ped variables). Most importantly, the program and the bootstrap
>> perfectly work on some dataset and get stuck on others (I was able to
>> replicate an example from Wooldridge's textbook before applying the
>> command on my dataset). Finally, changing the number of replications or
>> changing the clustering options does not affect the outcome.
>>
>> Anyone knows how I could find out what exactly is causing this error
>> message?
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1375 / Virus Database: 1500/3629 - Release Date: 05/10/11
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index