Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Why does STATA stop in the middle of the bootstrap process?


From   Lena Lindahl <[email protected]>
To   [email protected]
Subject   st: Why does STATA stop in the middle of the bootstrap process?
Date   Wed, 11 Apr 2007 09:29:19 +0200

Hi all!
Has anyone encountered the problem that STATA stops in the middle of a bootstrap process, without any error message, everything just stops after 5-15 iterations and nothing happens. The end of the result file looks like this:

bootstrap rho_se = r(rho_se):bs_rho_se
(running bs_rho_se on estimation sample)

Bootstrap replications (50)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
...............


This is my bootstrap do-file (I am bootstraping standard errors of a correlation):

use "C:\grunddata4.dta", clear
xtmixed lnincome || school:||lopnr:, emiterate(10)
matrix list e(b)
local var_u exp([lns1_1_1]_b[_cons])^2
local var_e exp([lns2_1_1]_b[_cons])^2
nlcom `var_u'/(`var_u'+`var_e')
mat V=r(V)
di as txt "SE = " as res sqrt(V[1,1])

cap program drop bs_rho_se
program bs_rho_se, rclass
xtmixed lnincome || school:||lopnr:, emiterate(10)
local var_u exp([lns1_1_1]_b[_cons])^2
local var_e exp([lns2_1_1]_b[_cons])^2
nlcom `var_u'/(`var_u'+`var_e')
ret list
tempname V
mat `V' = r(V)
return scalar rho_se = sqrt(`V'[1,1])
end
use "C:\grunddata4.dta", clear
bootstrap rho_se = r(rho_se):bs_rho_se

Best regards Lena


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index