binByMemory | R Documentation |
Memory is assessed either with the Hurst exponent or with the maximum auto- correlation (omitting lag zero). Hurst exponents are computed with function hurstexp in package pracma. The simple R/S Hurst exponent is selected.
binByMemory(x, thresholds = c(0.3, 0.5, 0.8), method = "autocor", d = round(ncol(x)/3))
x |
a matrix with objects as rows and time points as columns |
thresholds |
the thresholds by which to bin |
method |
autocor or hurst, computing the maximum auto-correlation (omitting lag=0) and the Hurst exponent, respectively |
d |
window size for Hurst exponent computation with function hurstexp |
The function returns an object that groups matrix row indices in different levels. Rows that could not be binned are classified in bin na.
list with row indices assigned to bins
N=10 ricker.out=ricker(N,generateA(N),K=rep(0.01,N)) memBinned=binByMemory(ricker.out) memBinned.bars=c(length(memBinned$autocor0.8Inf),length(memBinned$autocor0.50.8)) names(memBinned.bars)=names(memBinned) barplot(memBinned.bars,main="Auto-correlation bins", ylab="Number of rows")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.