m<-45; M<-60; N<-2^10-M
alpha<-0.8; H<-0.8; sigma<-0.3
lfsm<-path(N=N,m=m,M=M,alpha=alpha,H=H,
sigma=sigma,freq='L',disable_X=FALSE,seed=3)$lfsm
tryCatch(
increment(r=1,i=length(lfsm),k=length(lfsm)+100,path=lfsm),
error=function(c) 'An error occures when k is larger then the length of the sample path')
increment(r=3,i=50,k=3,path=lfsm)
path=c(1,4,3,6,8,5,3,5,8,5,1,8,6)
r=2; k=3
n <- length(path) - 1
DeltaX = increment(seq(r*k, n), path = path, k = k, r = r)
DeltaX == increments(k=k,r=r,path)
Run the code above in your browser using DataLab