IMsMedianSmoothingTransform.InputFactorTerm

Syntax

InputFactorTerm: IMsFormulaTermInfo;

Description

The InputFactorTerm property determines parameters of the input term that is a factor.

Comments

The property is outdated, use IMsMethodSeries.Input.

Example

Executing the example requires a form, a button with the Button1 identifier on this form, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1 that is used as a data source for TabSheetBox. The workspace of time series database must be loaded to the UiErAnalyzer1 component. This database must include a time series with the 98280 key containing annual data.

Click the button to start executing of this 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;

MedianSmoothing: IMsMedianSmoothingTransform;

TermInfo: IMsFormulaTermInfo;

Begin

Laner := UiErAnalyzer1.ErAnalyzer.Laner;

RubrIn := Laner.RubricatorInstance;

Factor := RubrIn.GetFactData(98280).Factor;

Laner.BeginUpdate;

Series := Laner.Series;

Serie := Series.AddSourceSerie(Factor);

VarStub := Serie.Stub;

CalcSerie := Series.AddCalculateSerie("MedianSmoothing");

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.MedianSmoothing;

Formula.Level := DimCalendarLevel.Year;

MedianSmoothing := Formula.Method As IMsMedianSmoothingTransform;

Slice := FormulaTransform.Inputs.Item(0).Slices.Add(Null);

TermInfo := FormulaTransform.CreateTermInfo;

TermInfo.Slice := Slice;

MedianSmoothing.InputFactorTerm := TermInfo;

Laner.EndUpdate;

WinApplication.InformationBox(CalcSerie.SaveModel.Name);

End Sub Button1OnClick;

After executing the example, a new series based on time series with the 98280 key is added. The calculated series calculated by the exponential smoothing method is created based on it. The calculated series is saved as a model, name of which is displayed in the information message.

See also:

IMsMedianSmoothingTransform