#include <oxstd.h>
#import  <pcfiml>
main()
{
    decl system = new PcFiml();

    system.LoadIn7("data/data.in7");
    system.Deterministic(FALSE);
                                    // formulate the system
    system.Select(Y_VAR, { "CONS", 0, 2, "INC", 0, 2 } );
    system.Select(X_VAR, { "INFLAT", 0, 0 } );
    system.Select(U_VAR, { "Constant", 0, 0 } );

    system.SetSelSample(1953, 1, 1992, 3);
    system.SetPrint(FALSE);     // don't print URF results
    system.Estimate();                     // estimate URF

    system.SetPrintUrf(FALSE);
    system.SetPrint(TRUE);       // but print model output
                                       // formulate a model
    system.SetEquation("CONS", {"CONS",1,2, "INC",0,0 });
    system.SetEquation("INC",  {"INC", 1,2 } );

    system.Fiml();           // estimate the model by FIML
    system.Portmanteau(12);               // do some tests
    system.EgeArTest(1, 1);
    system.EgeArTest(1, 5);
    system.NormalityTest();
    system.HeteroTest(FALSE, FALSE);
    system.HeteroTest(FALSE, TRUE);

    delete system;                  // done with the system
}
