avar | R Documentation |
Computes the Allan Variance
avar(x, type = "mo")
x |
A |
type |
A |
The decomposition and the amount of time it takes to perform it depends on whether you are using the Tau Overlap or the Maximal Overlap.
av A list
that contains:
"clusters"The size of the cluster
"allan"The Allan variance
"errors"The error associated with the variance estimation.
Given N
equally spaced samples with averaging time \tau = n\tau _0
,
where n
is an integer such that 1 \le n \le \frac{N}{2}
.
Therefore, n
is able to be selected from \left\{ {n|n < \left\lfloor {{{\log }_2}\left( N \right)} \right\rfloor } \right\}
Then, M = N - 2n
samples exist.
The Maximal-overlap estimator is given by:
\frac{1}{{2\left( {N - 2k + 1} \right)}}\sum\limits_{t = 2k}^N {{{\left[ {{{\bar Y}_t}\left( k \right) - {{\bar Y}_{t - k}}\left( k \right)} \right]}^2}}
where
{{\bar y}_t}\left( \tau \right) = \frac{1}{\tau }\sum\limits_{i = 0}^{\tau - 1} {{{\bar y}_{t - i}}}
.
Given N
equally spaced samples with averaging time \tau = n\tau _0
,
where n
is an integer such that 1 \le n \le \frac{N}{2}
.
Therefore, n
is able to be selected from \left\{ {n|n < \left\lfloor {{{\log }_2}\left( N \right)} \right\rfloor } \right\}
Then, a sampling of m = \left\lfloor {\frac{{N - 1}}{n}} \right\rfloor - 1
samples exist.
The tau-overlap estimator is given by:
where {{\bar y}_t}\left( \tau \right) = \frac{1}{\tau }\sum\limits_{i = 0}^{\tau - 1} {{{\bar y}_{t - i}}}
.
JJB
Long-Memory Processes, the Allan Variance and Wavelets, D. B. Percival and P. Guttorp
# Set seed for reproducibility
set.seed(999)
# Simulate time series
N = 100000
ts = gen_gts(N, WN(sigma2 = 2) + RW(gamma2 = 1))
# Maximal overlap
av_mat_mo = avar(ts, type = "mo")
# Tau overlap
av_mat_tau = avar(ts, type = "to")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.