Changeset 7168a54 in tol
- Timestamp:
- Mar 9, 2009, 8:57:39 AM (18 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 9a6c6f7
- Parents:
- 516e91c
- File:
-
- 1 edited
-
tol/bmath/bstat/arma.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/bmath/bstat/arma.cpp
r516e91c r7168a54 25 25 26 26 #include <tol/tol_matrix.h> 27 #include <tol/tol_bvmat.h> 27 28 #include <tol/tol_barma.h> 28 29 #include <tol/tol_bstat.h> … … 579 580 BMat gp, test; 580 581 BDat err; 582 583 BVMat ms, As, Ls, gps; 584 As.DMat2sparse((const BMatrix<double>&)A); 585 ms.DMat2sparse((const BMatrix<double>&)m); 586 BVMat::CholeskiFactor(As,Ls,"XtX",true,false); 587 BVMat::CholeskiSolve(Ls,(ms.T()*As).T(),gps,"PtLLtP"); 588 gps.GetDMat((BMatrix<double>&)gp); 589 test = A*gp-m; 590 err = test.FrobeniusNorm(); 581 591 582 592 //* 583 593 //TRZ(psi); TRZ(m); TRZ(A); 584 594 /* 585 595 if(p>100) 586 596 { … … 602 612 } 603 613 } 614 */ 615 bool closeToNonStationary = false; 604 616 if(err.IsUnknown() || (err>Sqrt((1+p)*DEpsilon()))) 605 617 { 618 closeToNonStationary = true; 606 619 BText method = BText("Golub_Reinsch_Mod"); 607 620 BMat U, V; … … 622 635 return(false); 623 636 } 624 else if( err>Sqrt((1+p)*DEpsilon()))625 { 637 else if(closeToNonStationary) 638 { 626 639 Warning(I2("ARMA structure is not numerically stationary. " 627 640 "Lost precision for autocovarianze matrix: ",
Note: See TracChangeset
for help on using the changeset viewer.
