plot.lo <- function(data, mult, n) { temp <- rep(0, (n + 1)) #For q=0: temp[1] <- rsfunc(data) #For q not 0. for(i in 1:n) { temp[i + 1] <- rsfunc.lo(data, i * mult) } plot(mult * c(0:n), temp, ylim = c(0, max(temp)), xlab = "q", ylab = "V_q", type = "l") #Confidence intervals for hypothesis of no long-range dependence (95 %). abline(h = c(0.809, 1.862), lty = 4) return(temp) }