# I've read that rollapply, and its wrapper apply.rolling() # from PerformanceAnalytics package, do not work with multivariate # time series neither their output can be a multivariate time series.
# Then I was wondering if any other function like those exists, or # if I need to write my own function to perform multivariate # time serie rolling analysis. # Something like this: # Let 'X' be your multivariate time series: # output <- matrix(NA, ncol = ncol(X), nrow = nrow(X)) # width <- 199 # for(i in 1:(nrow(output) - width) { # data <- X[i:(i + width),] # output[i,] <- function(data) #} # rownames(output) <- rownames(as.timeSeries(X)) # ...and this should be a (probably not efficient) way to do it. # Any better idea? # Thanks, -- View this message in context: http://r.789695.n4.nabble.com/Multivariate-apply-rolling-tp4636442.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.