Compute Maximal-Overlap Allan Variance using Means
Computation of Maximal-Overlap Allan Variance
avar_mo_cpp(x)
Arguments
x
: A vector
with dimensions N x 1.
Returns
av A list
that contains:
- "clusters"The size of the cluster
- "allan"The Allan variance
- "errors"The error associated with the variance estimation.
Details
Given N equally spaced samples with averaging time tau=n∗tau0, where n is an integer such that 1<=n<=N/2. Therefore, n is able to be selected from n∣n<floor(log2(N))
Then, M=N−2n samples exist. The Maximal-overlap estimator is given by: 2(N−2k+1)1t=2k∑N[Yˉt(k)−Yˉt−k(k)]2
where yˉt(τ)=τ1i=0∑τ−1yˉt−i.
Examples
set.seed(999)
N = 100000
white.noise = rnorm(N, 0, 2)
random.walk = cumsum(0.1*rnorm(N, 0, 2))
combined.ts = white.noise+random.walk
av_mat = avar_mo_cpp(combined.ts)
References
Long-Memory Processes, the Allan Variance and Wavelets, D. B. Percival and P. Guttorp
Author(s)
JJB