IMsCustomTerm.Seas

Syntax

Seas(Index: Integer;

    [CustomFrequency: MsFrequancy = 0]): Variant;

Parameters

Index. Year periods.

CustomFrequency. The frequency, for which values are created.

Description

The Seas method returns the dummy variable, each element of which determines whether the observation belongs to the specified period in the current year. The year is divided in accordance with series calendar frequency.

Comments

The method is available for the models with quarterly or monthly frequency only.

Seas(4)

Suppose that a model has quarterly frequency, start date of the sample period is 01.01.2003, and end date is 31.12.2004. The method determines whether the observation belongs to the fourth quarter. A dummy contains values:

Year

I quarter of 2003

II quarter of 2003

III quarter of 2003

IV quarter of 2003

I quarter of 2004

II quarter of 2004

III quarter of 2004

IV quarter of 2004

Value of the output variable

0,12

0,13

0,11

0,14

0,38

0,47

0,67

0,64

Seas value

0

0

0

1

0

0

0

1

Features of setting parameters:

Example

Executing the example requires that the repository contains a modeling container with the CONT_MODEL identifier that contains a determinate equation model with the DUMMIS_DETERM identifier.

Add links to the Metabase and Ms system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    MsDescr: IMetabaseObjectDescriptor;
    Model: IMsModel;
    Transf: IMsFormulaTransform;
    Determ: IMsDeterministicTransform;
Begin
    mb := MetabaseClass.Active;
    MsDescr := mb.ItemById("CONT_MODEL");
    Model := mb.ItemByIdNamespace("DUMMIES_DETERM", MsDescr.Key).Edit As IMsModel;
    Transf := Model.Transform;
    Determ := Transf.FormulaItem(0).Method As IMsDeterministicTransform;
    Determ.Expression.AsString := "Seas(4)";
    (Model As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the dummy variable is used in the model equation to determine whether observation belongs to the fourth quarter.

See also:

IMsCustomTerm