MovAvgR(Input: ITimeSeries,
Period: IMsPeriod,
WindowSize: Integer,
Casewise: MsCasewise)
Input. Output variable.
Period. Period, at which the method is calculated. If the parameter value is Null, the method is calculated at the entire time period.
WindowSize. Window size. Optional parameter. The parameter is set to 5 by default.
Casewise. Missing data treatment method. Optional parameter. The parameter is set to MsCasewise.No by default - missing data treatment is not used.
It transforms variable data with the moving average method with the R package.
The moving average method is based on representing a series as a sum of a relatively smooth trend and a random component.
Integration with R must be set up in the repository to use this method. For more details about integration setup see the How to Set Up Integration with R? section.
Formula | Result | Application |
= MovAvgR({Chicago - population[t]}, SetPeriod("01.01.2000", "01.01.2015"), 4, MsCasewise.Yes) | Moving average method is applied to the Chicago - population time series, window size is set to four at the period of 2000-2015. Missing data is treated using the Casewise method. Calculation is executed using the R package. |
It can be used in formulas of calculated series of time series database and model formulas of modeling container that is a child of the time series database. The calculation is executed without considering missing values. |
= MovAvgR(X1, SetPeriod("01.01.1990", "01.01.2015")) | Moving average method using the R package is applied to the X1 factor. | It can be used in model formulas of modeling container. |
See also:
Functions Available in Expression Editor | R Methods | IModelling.MovAvgR | The Calculation Method moving average