Skip to content
Prev 377228 / 398502 Next

Application of rolling window in entropy analysis

How about something like this:

ts= India[-1,]   #####For deleting the year row
N<-ncol(ts)
width <- 500
M <- nrow(ts) - width
r<-matrix(0, ncol = N, nrow = M)
library(pracma)
for (i in 1:N){
       r[,i]<-rollapply( data=ts[,i], width=width, FUN=approx_entropy, edim
= 2, r = 0.2*sd(ts[,i]), elag = 1, align="right")
}

Best,
Eric



On Fri, Nov 2, 2018 at 12:15 PM Subhamitra Patra <subhamitra.patra at gmail.com>
wrote: