IMsVariableTest.Type

Fore Syntax

Type: MsVariableTestType;

Fore.NET Syntax

Type: Prognoz.Platform.Interop.Ms.MsVariableTestType;

Description

The Type property returns descriptive statistic type.

Comments

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

Fore 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.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Ms;

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

See also:

IMsVariableTest