OlsR(Input: ITimeSeries,
Period: IMsPeriod,
ConstantValue: Variant,
AROrder: Integer,
MAOrder: Integer,
Casewise: MsCasewise,
Explanatories: Array)
Input. Output variable.
Period. Period, at which the method is calculated.
ConstantValue. Constant used in calculations.
AROrder. Autoregression order.
MAOrder. Moving average order.
Casewise. Missing data treatment method.
Explanatories. Explanatory variables.
It models the variable using the linear regression (OLS estimation). Calculation is executed using the R package.
Use the OlsR method only in series calculation mode.
Integration with R must be set up in the repository to use this method. For details about integration setup see the How to Set Up Integration with R? section.
Features of setting parameters:
Period. If the parameter is set to Null, the method is calculated at the entire time period.
ConstantValue. The constant value can be determined by the user or estimated automatically. To estimate values automatically, set the parameter to Estimate. If the model should be calculated without constant, set the parameter to None.
Explanatories. Elements that correspond to variables specified via comma. Remember that the number of explanatory variables (m) must satisfy the inequality: 0 < m < n-1 for a model with constant and 0 < m < n for a model without constant, where n is the number of observations in the output variable.
Formula | Result | Application |
= OlsR({Chicago - population[t]}, Null, None, 0, 0, MsCasewise.Yes, {Mexico - population[t]}) | The Chicago - population time series will be modeled by the linear regression method (OLS estimation) at the entire period using the following parameters: no constant is used, autoregression and moving average orders are not set, the Mexico - population time series is used as the explanatory variable, the Casewise missing data treatment method is used. 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. |
= OlsR(X1, SetPeriod(2000, 2015), Estimate, 1, 2, MsCasewise.Yes, X2, X3) | The X1 factor will be modeled using linear regression method (OLS estimation) by the following parameters: calculation period - 2000-2015, constant is estimated with the Estimate function, autoregression order is 1, moving average order is 2, explanatory variables - the X2 and X3 factors, missing data is treated with the Casewise method. Calculation is executed using the R package. |
It can be used in model formulas of modeling container. |
See also:
Functions Available in Expression Editor | R Methods | IModelling.OlsR | Least-Squares Method