TslsR

Syntax

TslsR(Input: ITimeSeries,
      Period: IMsPeriod,
      ConstantValue: Variant,
      Casewise: MsCasewise,
      Explanatories: Array)

Parameters

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.

Casewise. Missing data treatment method.

Explanatories. Exogenous and instrumental variables.

Description

It models the variable data using linear regression (instrumental variables estimation). Calculation is executed using the R package.

Comments

Use the TslsR method only when series mode of calculation is applied.

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.

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.

Explanatories. Exogenous and instrumental variables are specified via commas. Use the Null value to separate these types of variables. The number of instrumental variables must be greater or equal to the number of exogenous variables.

Example

Formula Result Application
= TslsR({Chicago - population[t]}, Null, Estimate, MsCasewise.No, {Mexico - unemployment method[t]},

Null, {Anchorage - population[t]})

The Chicago - population[t] time series will be modeled at the whole time period using linear regression method (instrumental variable estimation) by following parameters: constant value is estimated automatically, exogenous variable - the Mexico - unemployment level[t] time series, instrumental variable - the Anchorage - population[t] time series, missing data is not treated. 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.
= TslsR(X1, SetPeriod(2000, 2015), None, MsCasewise.Yes, X4, Null, X2, X3)

The X1 factor will be modeled using linear regression method (instrumental variables estimation method) by the following parameters: calculation period - 2000-2015, constant is not specified, exogenous variable - the X4 factor, instrumental variables - the X2 and X3 factors, missing data is treated using 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.TslsR |  Instrumental Variables Method