How to declare ADFD...
 
Notifications
Clear all

How to declare ADFDistribution for AugmentedDickeyFuller in C# code

2 Posts
1 Users
0 Reactions
318 Views
(@Anonymous)
New Member Guest
Joined: 1 second ago
Posts: 0
Topic starter  

Hello,

I am trying to understand how to create the: AugmentedDickeyFuller

The parameter I have problem to declare is the below ADFDistribution

ADFDistribution ADF_dist

How to implement that correctly for this C# code?

Thank you!

            double[] array_MSFT = new double[10] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
            int lagOrder = 0;
            ADFDistribution ADF_dist = new ???
            AugmentedDickeyFuller ADFtest = new AugmentedDickeyFuller(array_MSFT, TrendType.CONSTANT, lagOrder, ADF_dist);

            double pValue = ADFtest.pValue();
            double statistic = ADFtest.statistics();
            MessageBox.Show(pValue + "__" + statistic);

   
Quote
(@Anonymous)
New Member Guest
Joined: 1 second ago
Posts: 0
Topic starter  

I think I found a way like this:

ADFDistribution dist = TrendType.NO_CONSTANT.getDistribution(data.Length);

Thank you!


   
ReplyQuote
Share: