m********t 发帖数: 16 | 1 在求收益率时间序列数据的标准差时
被告知需要用bootstrap作
看了一些文献,可惜都没有实际运用部分
所以请教一下怎么在stata里做这个bootstrap?
万分感谢! |
m********t 发帖数: 16 | 2 i use stata as follows:
bs "interest rate" "r(sd)",rep(1000)
then i get a standard deviation
but i want to repeat this procedure for 500 times
(i want 500 standard deviations)
how can i do that?
i don't like to type in the same command 500 times
3q! |
l***n 发帖数: 812 | 3 stata has loop function
you can loop by values/function/variables......you name it.
for your purpose:
forvalues i=1(1)500 {
bs "interest rate" "r(sd)",rep(1000)
}
you can check forvalues/foreach function in Stata's manual.
【在 m********t 的大作中提到】 : i use stata as follows: : bs "interest rate" "r(sd)",rep(1000) : then i get a standard deviation : but i want to repeat this procedure for 500 times : (i want 500 standard deviations) : how can i do that? : i don't like to type in the same command 500 times : 3q!
|
m********t 发帖数: 16 | 4 3q!
i'm really a junior learner. |