search for: date_sample

Displaying 1 result from an estimated 1 matches for "date_sample".

Did you mean: data_sample
2009 Aug 10
0
Speeding up a bootstrap routine
...create matrices to hold sampling returns matrix_1 <- matrix(0,1,n) matrix_2 <- matrix(0,1,n) matrix_3 <- matrix(0,1,n) datevector <- 1:n # create vector for the actual "date sampling" # the bootstrap routine, placing results into the above results matrices for(i in 1:5000) { date_sample <- datevector[sample(n,n,replace=TRUE)] for(j in 1:n) { matrix_1[j] <- zerocentredreturns1[date_sample[j]] matrix_2[j] <- zerocentredreturns2[date_sample[j]] matrix_3[j] <- zerocentredreturns3[date_sample[j]] x <- mean(matrix_1) y <- mean(matrix_2) z <- mean(mat...