stdWindowSlopeCast: Broadcast calculation for variance of slope of windows

View source: R/windowCalc.R

stdWindowSlopeCastR Documentation

Broadcast calculation for variance of slope of windows

Description

\loadmathjax

Calculates the variability of trends as a function of windowing length. The time-series data is split up into chunks of size w, and each chunk is fit to the equation

\mjeqn

x(t) = A + Bt.

The function returns the standard deviation of the distribution of all the chunks Bs.

Usage

stdWindowSlopeCast(time, amplitude, windows)

Arguments

time

Times (spacings can be uniform or non-uniform), vector, float

amplitude

Amplitudes corresponding to times, vector, float

windows

Length of window(s) to calculate for, scalar or vector, float

Details

If 'windows' is a vector, the function will broadcast over it. Different calculation algorithms will be used depending on whether 'time' is uniformly or non-uniformly spaced.

Examples

## Broadcasting over a vector of windows
> time <- seq(0, 10, len=1000)
> amplitude <- sin(time)
stdWindowSlopeCast(time,amplitude,seq(0.1,0.8,len=5))
[1] 0.7243351 0.7299902 0.7294216 0.7379881 0.7297922

williamjsdavis/ItoGaussPlot documentation built on Oct. 18, 2023, 4:20 p.m.