Computes the sample autocorrelation of the given series.
Convenience wrapper around differencesAtLag[Vector[Double], Vector[Double], Int, Int]
Convenience wrapper around differencesAtLag[Vector[Double], Vector[Double], Int, Int]
vector to difference
the difference lag (e.g. x means destTs(i) = ts(i) - ts(i - x), etc)
the differenced vector, for convenience
Difference a vector with respect to the m-th prior element.
Difference a vector with respect to the m-th prior element. Size-preserving by leaving first
m
elements intact. This is the inverse of the inverseDifferences
function.
Series to difference
Series to store the differenced values (and return for convenience)
The difference lag (e.g. x means destTs(i) = ts(i) - ts(i - x), etc)
the starting index for the differencing. Must be at least equal to lag
the differenced vector, for convenience
Performs differencing of order d
.
Performs differencing of order d
. This means we recursively difference a vector a total of
d-times. So that d = 2 is a vector of the differences of differences. Note that for each
difference level, d_i, the element at ts(d_i - 1) corresponds to the value in the prior
iteration.
time series to difference
order of differencing
a vector of the same length differenced to order d
Down sample by taking every nth element starting from offset phase
Down sample by taking every nth element starting from offset phase
Vector to down sample
take every nth element
offset from starting index
downsampled vector with appropriate length
fills in NaN with the next available not NaN, scanning from right to left.
fills in NaN with the next available not NaN, scanning from right to left. 1 NaN NaN 2 Nan -> 1 2 2 2 NaN
fills in NaN with the previously available not NaN, scanning from left to right.
fills in NaN with the previously available not NaN, scanning from left to right. 1 NaN NaN 2 Nan -> 1 1 1 2 2
Fill in NaN values using a natural cubic spline.
Fill in NaN values using a natural cubic spline.
Vector to interpolate
Interpolated vector
Replace all NaNs with a specific value
Replace all NaNs with a specific value
fills in NaN with a default value
Convenience wrapper around inverseDifferencesAtLag[Vector[Double], Vector[Double], Int, Int]
Convenience wrapper around inverseDifferencesAtLag[Vector[Double], Vector[Double], Int, Int]
differenced vector that we want to inverse
the difference lag (e.g. x means destTs(i) = ts(i) - ts(i - x), etc)
the inverse differenced vector, for convenience
Calculate an "inverse-differenced" vector of a given lag.
Calculate an "inverse-differenced" vector of a given lag. Size-preserving by leaving first
startIndex
elements intact. This is the inverse of the differences
function.
differenced vector that we want to inverse
Series to store the added up values (and return for convenience)
The difference lag (e.g. x means destTs(i) = diffedTs(i) + destTs(i - x), etc)
the starting index for the differencing. Must be at least equal to lag
the inverse differenced vector, for convenience
Inverses differencing of order d
.
Inverses differencing of order d
.
time series to reverse differencing process
order of differencing
a vector of the same length, which when differenced to order ts, yields the original vector provided
Lags the univariate time series
Lags the univariate time series
Example input vector: (1.0, 2.0, 3.0, 4.0, 5.0)
With lag 2 and includeOriginal = true should give output matrix:
3.0 2.0 1.0 4.0 3.0 2.0 5.0 4.0 3.0
Trim leading NaNs from a series.
Trim trailing NaNs from a series.
Up sample by inserting n - 1 elements into the original values vector, starting at index phase
Up sample by inserting n - 1 elements into the original values vector, starting at index phase
the original data vector
the number of insertions between elements
the offset to begin
fill with zeros rather than NaN
upsampled vector filled with zeros or NaN, as specified by user