Balanced Bootstrap
平衡Bootstrap是每个Bootstrap样本中的元素都出现相同的次数。假设n=5,times=3,其算法为,
1)构造Bootstrap指标变量,如index={1,1,1,2,2,2,3,3,3,4,4,4,5,5,5}。指标变量从1开始到5结束,每个指标元素都出现3次,在Gauss中可以写为index=vec(reshape(seqa(1,1,n),times,n));
2)打乱index中的元素,得到rindex=index[rankindx(rndu(n*times,1),1)];
3)然后在根据打乱后index中的元素,得到Bootstrap 样本,进行统计推断。
包括两个程序:
程序一:如何抽样
程序二:Balanced Bootstrap oLS


雷达卡




京公网安备 11010802022788号







