- Timestamp:
- Apr 12, 2010, 2:09:09 PM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- a30612b
- Parents:
- e06a79e
- File:
-
- 1 edited
-
tol_tests/tol/ARIMA/mcmc/mtrymh.tol (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol_tests/tol/ARIMA/mcmc/mtrymh.tol
re06a79e r3e558bb 134 134 { 135 135 VMatrix _.x := Copy(y); 136 Real doAfterDraw(0);137 136 Real _.num_accept := _.num_accept +1 138 137 }); … … 147 146 Real _.s := _.s*_.sFactor 148 147 }); 148 //Real If(_.accept, { Real doAfterDraw(0) }); 149 Real doAfterDraw(0); 149 150 _.accept 150 151 }; … … 507 508 //////////////////////////////////////////////////////////////////////////// 508 509 { 509 Polyn _.ar := ARIMAGetAR(_.arima); 510 Polyn _.ma := ARIMAGetMA(_.arima); 511 NameBlock _.almagro := ARMAProcess::Eval.Almagro(_.ar,_.ma,_.z,_.sigma); 510 Real If(_.accept, 511 { 512 Polyn _.ar := ARIMAGetAR(_.arima); 513 Polyn _.ma := ARIMAGetMA(_.arima); 514 NameBlock _.almagro := ARMAProcess::Eval.Almagro(_.ar,_.ma,_.z,_.sigma); 515 True 516 }); 512 517 VMatrix _.u0 := _.almagro::Draw.U_cond_Z(0); 513 518 VMatrix _.z0 := _.almagro::Get.Z0(_.u0); … … 525 530 SetOfPolyn(1-f->AR, 1-f->MA) 526 531 }); 527 VMatrix _.x := arima2col(_.arima); 532 VMatrix _.x := arima2col(_.arima); 533 Real _.accept := True; 528 534 Real ok = setArima(0); 529 535 Real _.n := VRows(_.x); … … 557 563 //////////////////////////////////////////////////////////////////////////// 558 564 { 559 Set _.arima := col2arima(_.x);560 Real setArima(void) ;561 Real doAfterDraw_cum(void)565 Set If(_.accept, _.arima := col2arima(_.x)); 566 Real setArima(void) 567 // Real doAfterDraw_cum(void) 562 568 }; 563 569 … … 698 704 Real TolOprProfiler.Enabled := True; 699 705 While(numSim<2500, append_draw(mtm_arima::draw_multiple_try(0))); 700 Real TolOprProfiler.Dump("draw_multiple_try. 03.csv");706 Real TolOprProfiler.Dump("draw_multiple_try.csv"); 701 707 Real mtm.time = (Copy(Time) - mtm.t0)/numSim; 702 708 WriteLn("Time by MTM simulation "<<mtm.time); 703 709 /* */ 704 710 705 Matrix real_param = Group("ConcatColumns", For(1,Columns(PARAM),Matrix(Real j)711 Matrix cmp = mcmc | Group("ConcatColumns", For(1,Rows(PARAM),Matrix(Real j) 706 712 { 707 Constant(Rows( PARAM),1,MatDat(PARAM,j,1))713 Constant(Rows(mcmc),1,MatDat(PARAM,j,1)) 708 714 })); 709 715 710 716 /* */ 711 717 718 719
Note: See TracChangeset
for help on using the changeset viewer.
