avar: Calculate the Allan Variance

View source: R/avar.r

avarR Documentation

Calculate the Allan Variance

Description

Computes the Allan Variance

Usage

avar(x, type = "mo")

Arguments

x

A vec containing the time series under observation.

type

A string containing either "mo" for Maximal Overlap or "to" for Tau Overlap

Details

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.

Value

av A list that contains:

  • "clusters"The size of the cluster

  • "allan"The Allan variance

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

Maximal Overlap Allan Variance

Given N equally spaced samples with averaging time tau = n*tau_0, 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:

See PDF Manual

where

See PDF Manual

.

Tau-Overlap Allan Variance

Given N equally spaced samples with averaging time tau = n*tau_0, 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, a sampling of m = ≤ft\lfloor {\frac{{N - 1}}{n}} \right\rfloor - 1 samples exist. The tau-overlap estimator is given by:

where See PDF Manual.

Author(s)

JJB

References

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

Examples

# 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")

schoi355/gmwm documentation built on April 11, 2022, 1:21 a.m.