IdentificationStartDate: DateTime;
The IdentificationStartDate property determines a sample period start date.
Executing the example requires a form, a button with the Button1 identifier on the form, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1, which is used as a data source for TabSheetBox. A working area of the time series database must be loaded to UiErAnalyzer1. This database must contain a time series with the 98280 key that contains annual data.
Click the button to execute the example.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Laner: ILaner;
Series: ILanerSeries;
RubrIn: IRubricatorInstance;
Factor: IRubricatorFactor;
Serie: ILanerSourceSerie;
VarStub: IVariableStub;
CalcSerie: ILanerCalculateSerie;
TransformModel: IFormulaTransformModel;
FormulaTransform: IMsFormulaTransform;
Slice: IMsFormulaTransformSlice;
Selector: IMsFormulaTransformSelector;
Formula: IMsFormula;
Arima: IMsArimaTransform;
TermInfo: IMsFormulaTermInfo;
Begin
Laner := UiErAnalyzer1.ErAnalyzer.Laner;
Laner.ForecastStartYear := 2008;
RubrIn := Laner.RubricatorInstance;
Factor := RubrIn.GetFactData(98280).Factor;
Laner.BeginUpdate;
Series := Laner.Series;
Serie := Series.AddSourceSerie(Factor);
VarStub := Serie.Stub;
CalcSerie := Series.AddCalculateSerie("ARIMA");
TransformModel := CalcSerie.Transform;
TransformModel.AddInputVariable(VarStub);
TransformModel.IdentificationStartDate := DateTime.Parse("01.01.2000 00:00:00");
TransformModel.IdentificationEndDate := DateTime.Parse("31.12.2007 00:00:00");
TransformModel.ForecastStartDate := DateTime.Parse("01.01.2008 00:00:00");
TransformModel.ForecastEndDate := DateTime.Parse("31.12.2017 00:00:00");
TransformModel.UsePeriod := True;
FormulaTransform := TransformModel.Transform As IMsFormulaTransform;
FormulaTransform.Inputs.Add(VarStub);
Slice := FormulaTransform.Outputs.Item(0).Slices.Add(Null);
Selector := FormulaTransform.CreateSelector;
Selector.Slice := Slice;
Formula := FormulaTransform.Transform(Selector);
Formula.Kind := MsFormulaKind.Arima;
Formula.Level := DimCalendarLevel.Year;
Arima := Formula.Method As IMsArimaTransform;
Slice := FormulaTransform.Inputs.Item(0).Slices.Add(Null);
TermInfo := FormulaTransform.CreateTermInfo;
TermInfo.Slice := Slice;
Arima.InputFactorTerm := TermInfo;
Laner.EndUpdate;
End Sub Button1OnClick;
After executing the example the ARIMA new calculated series is added that calculates the factor with the 98280 key using the ARIMA method. The specified sample and forecasting periods are used for calculations.
See also: