Hi statausers:

I'm trying to run a Bootstrap code to get standard errors out of a matrix. The code runs well but when generating the matrix, all the entrances get used by the last data introduced. To avoid this, I tried generating different databases to get the statistics from. The code (simplified) looks like this:


global k = "2009/2011"
global l = "1/20"

forvalues i = $l {
forvalues i = $k {
use "$final_bootstrap\panel_2007-2011_stats.dta"
keep if year == 2008 | year ==`i'
save "$final_teffects\base_2008-`i'_stats_$l.dta"
clear
}
}

The idea was to generate 60 databases, 20 for each year (2009, 2010, 2011). However, Stata says the resulting file could not be opened and therefore it doesn't save the different databases, with the different names assigned.

Any help? Thanks in advance,

Adrian