Transform: Object;
The Transform property returns the object that enables the user to set up calculation method parameters.
To set up parameters of calculation method, the returned object must be cast to the IMsFormulaTransform interface.
Executing the example requires a form, a button with the Button1 identifier on the form, the LanerBox component and the UiErAnalyzer component named UiErAnalyzer1, which is used as a data source for LanerBox. A workbook 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;
Series := Laner.Series;
RubrIn := Laner.RubricatorInstance;
Factor := RubrIn.GetFactData(98280).Factor;
Laner.BeginUpdate;
Serie := Series.AddSourceSerie(Factor);
VarStub := Serie.Stub;
CalcSerie := Series.AddCalculateSerie("ARIMA");
TransformModel := CalcSerie.Transform;
TransformModel.AddInputVariable(VarStub);
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.
See also: