avar_mo_cpp: Compute Maximal-Overlap Allan Variance using Means

View source: R/RcppExports.R

avar_mo_cppR Documentation

Compute Maximal-Overlap Allan Variance using Means

Description

Computation of Maximal-Overlap Allan Variance

Usage

avar_mo_cpp(x)

Arguments

x

A vector with dimensions N x 1.

Details

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}}} .

Value

av A list that contains:

  • "clusters"The size of the cluster

  • "allan"The Allan variance

  • "errors"The error associated with the variance estimation.

Author(s)

JJB

References

Long-Memory Processes, the Allan Variance and Wavelets, D. B. Percival and P. Guttorp

Examples

set.seed(999)
# Simulate white noise (P 1) with sigma^2 = 4
N = 100000
white.noise = rnorm(N, 0, 2)
#plot(white.noise,ylab="Simulated white noise process",xlab="Time",type="o")
#Simulate random walk (P 4)
random.walk = cumsum(0.1*rnorm(N, 0, 2))
combined.ts = white.noise+random.walk
av_mat = avar_mo_cpp(combined.ts)

SMAC-Group/gmwm documentation built on June 10, 2025, 6:10 a.m.