calculateTSstatistics: Calculate various statistics for the time-series provided as...

Description Usage Arguments Value Examples

View source: R/calculateTSstatistics.r

Description

Calculate various statistics for the time-series provided as an argument

Usage

1

Arguments

ts

A time-series (a numeric vector)

its

Indices of which bin the values of x correspond to (a numeric vector of integers between 1 and p). This is optional, and taken to be cyclical by default.

p

Length of the period to test for (a positive integer)

Value

A list with the following components: - signalNoiseRatio: The signal to noise ratio estimated for the time-series - noiseAC: The autocorrelation of the noise time-series - signalAC: The (circular) autocorrelation of the signal of length p - nSignals: The number of length p periods in the time-series

Examples

1
2
3
4
5
6
7
8
## Generate a random time-series:
##  - length = 1000
##  - signal period = 8
##  - signal to noise ratio = 0.2
set.seed(42)

x <- rep(rnorm(8)*0.2,length.out = 1000) + rnorm(1000)
calculateTSstatistics(ts = x, p = 8)

JeremySilver/RandomThinning documentation built on May 27, 2017, 12:02 a.m.