OlsR(Input: ITimeSeries,
Period: IMsPeriod,
ConstantValue: Variant,
AROrder: Integer,
MAOrder: Integer,
Casewise: MsCasewise,
Explanatories: Array)
Context. Context. The parameter is used only in Fore.NET
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
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 OlsR function only when series mode of calculation is applied.
ConstantValue. The constant value can be determined by the user or estimated automatically. Use the Estimate function, to estimate values automatically. If the model must be calculated without constant, use the None function.
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 string "backcast.No". 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 model with constant and 0 < m < n for 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