Displaying 1 result from an estimated 1 matches for "botstraping".
Did you mean:
bootstraping
2009 May 30
0
improve efficiency of a loop
...fill the rest of the values using this loop:
> for(.t in 3:length(d$time)){
> ? ? ? d$y.b[c(.t)]<-gamma*d$y.b[c(.t-1)] + beta*d$x[c(.t)] ?+ d$res[c(.t)] #pretending that res are resampled errors.
> ? ? ? }
My problem is that this becomes very slow --- painfully slow when I am
actually botstraping --- when I have several observations or more than
one index (hence more looping levels) in the dependent variable. I
tried to use lapply, but it seems to me that it is not adequate when
you have a recursive situation such the one above. Any hint?
I appreciate any help,
Nelson Villoria