Package com.imsl.stat
Class TimeSeriesOperations
java.lang.Object
com.imsl.stat.TimeSeriesOperations
- All Implemented Interfaces:
Serializable,Cloneable
A class of operations and methods for objects of class TimeSeries.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumPublic enum of methods for combining synchronous time series values.static interfacePublic interface for the user-supplied function that defines how to combine two synchronous time series values.static enumPublic enum of merge rules that defines how two time series should be merged. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbackshift(TimeSeries ts, int lag) Returns the backshifted version of the time series.double[][]getMeanCenteredSeries(TimeSeries timeSeries) Returns the mean-centered values of all the series in aTimeSeriesobject.double[]getMeanCenteredSeries(TimeSeries timeSeries, int k) Returns the mean-centered values of the k-th series in aTimeSeriesobject.merge(TimeSeries ts1, TimeSeries ts2) Merges two time series objects.voidSets the combine function to a user supplied function.voidsetCombineMethod(TimeSeriesOperations.CombineMethod combineMethod) Sets the method for combining synchronous time series values.voidsetMergeRule(TimeSeriesOperations.MergeRule mergeRule) Sets the rule that defines how two time series are merged.double[]stack(TimeSeries ts) Stacks or vectorizes the values of a multivariate TimeSeries.
-
Constructor Details
-
TimeSeriesOperations
public TimeSeriesOperations()Constructor for TimeSeriesOperations.
-
-
Method Details
-
getMeanCenteredSeries
Returns the mean-centered values of all the series in aTimeSeriesobject.- Parameters:
timeSeries- aTimeSeriesobject- Returns:
- a
doublematrix containing the mean-centered values
-
getMeanCenteredSeries
Returns the mean-centered values of the k-th series in aTimeSeriesobject.- Parameters:
timeSeries- aTimeSeriesobjectk- anint, the column index of the series- Returns:
- a
doublearray containing the mean-centered values
-
setMergeRule
Sets the rule that defines how two time series are merged.- Parameters:
mergeRule- aMergeRulevalue.
-
setCombineMethod
Sets the method for combining synchronous time series values.- Parameters:
combineMethod- aCombineMethodvalue.
-
setCombineFunction
Sets the combine function to a user supplied function. Must be defined when combineMethod = CombineMethod.CUSTOM.- Parameters:
function- aFunctionthat defines how two values should be combined.
-
backshift
Returns the backshifted version of the time series. For a given lag \(l \ge 0 \) the backshift operation is defined as: $$ B^ly_t = y_{t-l} $$.- Parameters:
ts- aTimeSeriesobject.lag- anintspecifying the lag.- Returns:
TimeSerieswith values at indexithe same as the original series values at positioni-lag;
-
stack
Stacks or vectorizes the values of a multivariate TimeSeries.- Parameters:
ts-TimeSeries- Returns:
- A
double[]array of lengthT*numberOfSerieswith the index1,...,numberOfSeriesvarying fastest.
-
merge
Merges two time series objects.- Parameters:
ts1- aTimeSeriesobject.ts2- aTimeSeriesobject.- Returns:
- a
TimeSeriesobject resulting from mergingts1andts2.
-