Changeset fc659f1 in tol


Ignore:
Timestamp:
Mar 21, 2009, 3:37:29 PM (18 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
0987ed8
Parents:
f948141
Message:

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@806 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol_tests/tol/random_generation/test_0005/test.tol

    rf948141 rfc659f1  
    1111   "ARMA noise" ;
    1212
    13   Real PutRandomSeed(1938259105);
     13  Real PutRandomSeed(0);
    1414  Real rnd_seed=GetRandomSeed(0);
    1515  WriteLn("rnd_seed "+IntText(rnd_seed));
    … …  
    6767  //of density of linear regression parameters and also of corresponding
    6868  //ARMA noise
    69 //Matrix logDens = SetMat(For(1,100,Set(Real iter)
    70 //{
    71     WriteLn("TRACE Iteration "<<iter);
    72     WriteLn("TRACE Simulates n independent normal variables");
     69  Matrix logDens = SetMat(For(1,1000,Set(Real iter)
     70  {
     71  //WriteLn("TRACE Iteration "<<iter);
     72  //WriteLn("TRACE Simulates n independent normal variables");
    7373    VMatrix b01 = Gaussian(n,1,0,1);
    74     WriteLn("TRACE Applys the regular linear change of variables to draw the paraneters");
     74  //WriteLn("TRACE Applys the regular linear change of variables to draw the paraneters");
    7575    VMatrix b_ = nu_+CholeskiSolve(L_,b01,"LtP");
    7676   
    77     WriteLn("TRACE logarithm of density of linear regression parameters is not affected by a regular linear variable change");
     77  //WriteLn("TRACE logarithm of density of linear regression parameters is not affected by a regular linear variable change");
    7878    Real lgDns_b = MatSum(Log(f01(VMat2Mat(b01))));
    7979 
    8080    VMatrix z_ = (Y-X*b_)*(1/s);
    81     WriteLn("TRACE Calculates logarithm of density of ARMA noise by Levinson method");
     81  //WriteLn("TRACE Calculates logarithm of density of ARMA noise by Levinson method");
    8282    Set ev.levinson =  ARIMALevinsonEval(arima,VMat2Mat(z_));
    8383    Real lgDns_z.levinson = ev.levinson::logLH;
    84 
    85     WriteLn("TRACE Calculates logarithm of density of ARMA noise by Almagro method");
     84/* */
     85  //WriteLn("TRACE Calculates logarithm of density of ARMA noise by Almagro method");
    8686    Set ev.almagro.1 = ARIMAAlmagroEval(arima, VMat2Mat(z_));
    8787    Real lgDns_z.almagro.1 = ev.almagro.1::logLH;
    88 
    89     WriteLn("TRACE Alternative expression for Almagro method");
     88/* */
     89  //WriteLn("TRACE Alternative expression for Almagro method");
    9090    NameBlock ev.almagro.2 = ARMAProcess::Eval.Almagro(ar, ma, z_, 1);
    9191    Real lgDns_z.almagro.2 = ev.almagro.2::_.logLH;
    92 /*
    9392    [[lgDns_b, lgDns_z.almagro.2, lgDns_z.almagro.2, lgDns_z.levinson]]
    9493  }));
     94
    9595  //logarithm of density of linear regression parameters
    9696  Matrix lgDns_b  = SubCol(logDens,[[1]]);
    … …  
    146146                  Min(quality.almagro.1, quality.almagro.2, quality.levinson);
    147147
    148   WriteLn("TRACE 6");
    149148//Return the results
    150149  Set resultStr_ = strTestStatus(summary_, link_, quality_,
Note: See TracChangeset for help on using the changeset viewer.