Am 19.10.2017 um 15:44 schrieb Artur T.:
> I am programming a stationary bootstrap where the block length varies
> randomly. This is why I avoid resample(). As resample() is written in
> C (I assume) it should be faster, I guess...
Then perhaps you should look at the "SB" contributed package (by F. Di
Iorio, S. Fachin).
If it doesn't do what you need it would still be useful to know.
cheers,
sven
Good idea, I did the horse race (see the attached file). The output is
almost identical for 20000 MC iterations and using the SB's sample
script. My SBAT() function beats SB() substantially.
<OUTPUT>
*******************************************************************************
SB() took = 10.134 sec.
estimated coefficients 4.47 1.29 -2.40
95% bootstrap confidence intervals
Lower limits 3.06 1.08 -2.91
Upper limits 5.77 1.52 -1.89
*******************************************************************************
*******************************************************************************
SBAT() took = 6.445 sec.
estimated coefficients 4.47 1.29 -2.40
95% bootstrap confidence intervals
Lower limits 3.23 1.10 -2.86
Upper limits 5.63 1.49 -1.94
*******************************************************************************
</OUTPUT>
Artur