- Timestamp:
- Mar 21, 2009, 3:37:29 PM (18 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 0987ed8
- Parents:
- f948141
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tol_tests/tol/random_generation/test_0005/test.tol
rf948141 rfc659f1 11 11 "ARMA noise" ; 12 12 13 Real PutRandomSeed( 1938259105);13 Real PutRandomSeed(0); 14 14 Real rnd_seed=GetRandomSeed(0); 15 15 WriteLn("rnd_seed "+IntText(rnd_seed)); … … 67 67 //of density of linear regression parameters and also of corresponding 68 68 //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"); 73 73 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"); 75 75 VMatrix b_ = nu_+CholeskiSolve(L_,b01,"LtP"); 76 76 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"); 78 78 Real lgDns_b = MatSum(Log(f01(VMat2Mat(b01)))); 79 79 80 80 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"); 82 82 Set ev.levinson = ARIMALevinsonEval(arima,VMat2Mat(z_)); 83 83 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"); 86 86 Set ev.almagro.1 = ARIMAAlmagroEval(arima, VMat2Mat(z_)); 87 87 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"); 90 90 NameBlock ev.almagro.2 = ARMAProcess::Eval.Almagro(ar, ma, z_, 1); 91 91 Real lgDns_z.almagro.2 = ev.almagro.2::_.logLH; 92 /*93 92 [[lgDns_b, lgDns_z.almagro.2, lgDns_z.almagro.2, lgDns_z.levinson]] 94 93 })); 94 95 95 //logarithm of density of linear regression parameters 96 96 Matrix lgDns_b = SubCol(logDens,[[1]]); … … 146 146 Min(quality.almagro.1, quality.almagro.2, quality.levinson); 147 147 148 WriteLn("TRACE 6");149 148 //Return the results 150 149 Set resultStr_ = strTestStatus(summary_, link_, quality_,
Note: See TracChangeset
for help on using the changeset viewer.
