search for: adfrol

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

Did you mean: adfroll
2006 Aug 28
1
Help on function adf.test
...ariable; for the first column I calculate the adf test statistic for window my.win = 60 for example, roll forward one observation, calculate the adf again, and so on, until the end of the first column is reached and then I jump to the second column etc. The code for doing this is given below: adfroll <- sapply(1:(ncol(EUROPEDATA)), function(i, my.data, my.win) { sss <- sapply(1:(nrow(my.data)-my.win), function (j, my.data, my.win) { my.data <- as.matrix(my.data) ans <- adf.test(na.omit(my.data[j:(j+my.win)])) return(ans$p.value) },my.data=my.data[,i],my.win=my.win) }...