Ols(Input: ITimeSeries,
Period: IMsPeriod,
ConstantValue: Variant,
AROrder: String,
MAOrder: String,
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).
Use the Ols function only in series calculation mode.
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.
AROrder, MAOrder. Parameters are set in the string view. Specify the numbers or ranges of autoregression or moving average orders separated by commas. The range of autoregression or moving average orders is specified via the sign -. For example: AROrder = "1-3,5".
MAOrder. If the moving average order is set, back-casting can be used to estimate its coefficients. By default the back-casting is used. If the back-casting needs to be disabled, the MAOrder parameter should contain the backcast.No string. For example: MAOrder = "1-4;backcast.No".
Explanatories. Terms, corresponding to variables, are 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 |
= Ols({Brazil|BCA[t]},SetPeriod("01.01.2002", "01.01.2015"), None,"","", MsCasewise.Yes,{China|BCA}) | The Brazil|BCA series will be modeled by the linear regression method (OLS estimation) for the period from 2002 to 2016 by the following parameters: constant is not used, autoregression and moving average orders are not set, explanatory variable is the China|BCA exponent, calculation is executed using missing data treatment. |
It can be used in formulas of calculated series of time series database and in formulas of attribute-based models of modeling container. |
= Ols(X1, Null, Estimate, "1", "2;backcast.No", MsCasewise.Yes, X2, X3) | The X1 factor will be modeled using linear regression method (OLS estimation) by the following parameters: constant is estimated by the Estimate function, autoregression order is 1, moving average order is 2, to estimate moving average coefficients, backcasting is not used, explanatory variables - the X2 and X3 factors, calculation is executed using the Casewise missing data treatment method. |
It can be used in model variable-based formulas of modeling container. |
See also:
Functions Available in Expression Editor │ Regression │ IModelling.Ols │ Least-Squares Method