IMsVariableTest.Type

Syntax

Type: MsVariableTestType;

Description

The Type property returns descriptive statistic type.

Comments

To set up statistic calculation options, use the IMsVariableTest.Settings property.

Example

The example is the function which calculates the descriptive statistic and returns calculation results. Input parameter of the function: Test is the object used to calculate descriptive statistic.

To execute the example, add a link to the Ms system assembly.

Function VariableTest(Test: IMsVariableTest): IMsVariableTestResults;
Var
    DF: IMsDFTestSettings;
    Johansen: IMsJohansenTestSettings;
    Granger: IMsGrangerTestSettings;
    PairCorr: IMsPairCorrelationTestSettings;
Begin
    Select Case Test.Type
        Case MsVariableTestType.DF:
            DF := Test.Settings As IMsDFTestSettings;
            DF.AutoRegressionOrder := 2;
            Debug.WriteLine("Augmented Dickey-Fuller test");
        Case MsVariableTestType.Granger:
            Granger := Test.Settings As IMsGrangerTestSettings;
            Granger.ConfidenceLevel := 0.1;
            Debug.WriteLine("Granger test");
        Case MsVariableTestType.Johansen:
            Johansen := Test.Settings As IMsJohansenTestSettings;
            Johansen.AutoRegressionOrder := "2";
            Debug.WriteLine("Johansen test");
        Case MsVariableTestType.PairCorrelation:
            PairCorr := Test.Settings As IMsPairCorrelationTestSettings;
            PairCorr.BalancedSample := False;
            Debug.WriteLine("Paired correlation coefficients");
    End Select;
    Return Test.Execute;
End Function VariableTest;

Example execution result: parameters of descriptive statistic are changed, it is calculated, and the name of the calculated statistic is displayed in the console window. Calculation results are returned to the user.

See also:

IMsVariableTest