# Why do I keep getting a zero matrix from TFitResult for some dataset while not the others?

**URL:** <https://root-forum.cern.ch/t/why-do-i-keep-getting-a-zero-matrix-from-tfitresult-for-some-dataset-while-not-the-others/35107>\
**Category:** ROOT\
**Created:** [July 11, 2019, 4:14am UTC](https://root-forum.cern.ch/t/why-do-i-keep-getting-a-zero-matrix-from-tfitresult-for-some-dataset-while-not-the-others/35107 "2019-07-11T04:14:33Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Shonlin](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/e79b87/32.png) [@Shonlin](https://root-forum.cern.ch/u/Shonlin)\
**Post date:** [July 12, 2019, 8:01pm UTC](https://root-forum.cern.ch/t/why-do-i-keep-getting-a-zero-matrix-from-tfitresult-for-some-dataset-while-not-the-others/35107/5 "2019-07-12T20:01:31Z")

</div>

Dear StephanH @StephanH :

Thanks. Good news: after using the verbose mode “V”, it returns to me some EXTERNAL ERROR MATRIX, which seems to be the covariance matrix that I always want (see the terminal report below).  
But still the MIGRAD thing didn’t converge, I’m not sure how that happened when everything “seems” to be fine (the fit result seems to agree with my data; and it actually get some reasonable covariance matrix, and just doesn’t want to share it with me, when I print it.).  
Now I’m not sure if it’s legitimate to use the EXTERNAL MATRIX as my covariance matrix after all its error-report on MIGRAD divergence.

* * *

The following is the terminal report, starting from the second last fit status report:

```auto
 FCN=38.2639 FROM MIGRAD STATUS=PROGRESS 1604 CALLS 1605 TOTAL
                     EDM=0.00628792 STRATEGY= 1 ERROR MATRIX UNCERTAINTY 20.7 per cent
  EXT PARAMETER APPROXIMATE STEP FIRST   
  NO. NAME VALUE ERROR SIZE DERIVATIVE 
   1 p0 2.96631e-01 9.40791e-02 3.91372e-03 -1.12405e+02
   2 p1 3.70289e-01 2.53365e-02 -1.98576e-03 -2.65629e+01
   3 p2 8.30575e-03 1.00820e-02 -1.95435e-02 -3.06363e+00
   4 p3 1.23265e+00 3.75070e-02 -3.36459e-03 -1.39326e+02
   5 p4 1.43869e+01 1.01233e-01 -1.43233e-03 9.98044e+01
 CALL LIMIT EXCEEDED IN MIGRAD.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.
 FCN=38.2478 FROM MIGRAD STATUS=CALL LIMIT 1630 CALLS 1631 TOTAL
                     EDM=0.00988881 STRATEGY= 1 ERROR MATRIX UNCERTAINTY 14.5 per cent
  EXT PARAMETER APPROXIMATE STEP FIRST   
  NO. NAME VALUE ERROR SIZE DERIVATIVE 
   1 p0 3.02999e-01 1.08434e-01 1.31306e-03 -2.14674e+02
   2 p1 3.72073e-01 3.38375e-02 1.20516e-03 -3.40276e+01
   3 p2 8.84789e-03 1.12145e-02 -5.94815e-03 3.18160e+00
   4 p3 1.22696e+00 6.50898e-02 -1.64670e-03 -3.91608e+02
   5 p4 1.43640e+01 2.63856e-01 -8.94469e-04 3.39474e+02
 EXTERNAL ERROR MATRIX. NDIM= 25 NPAR= 5 ERR DEF=1
  1.176e-02 -1.636e-03 -1.213e-03 -6.063e-03 -1.414e-02 
 -1.636e-03 1.145e-03 2.077e-04 -1.446e-04 -4.736e-03 
 -1.213e-03 2.077e-04 1.270e-04 5.821e-04 1.162e-03 
 -6.063e-03 -1.446e-04 5.821e-04 4.238e-03 1.493e-02 
 -1.414e-02 -4.736e-03 1.162e-03 1.493e-02 6.963e-02 
ERR MATRIX APPROXIMATE
 PARAMETER CORRELATION COEFFICIENTS  
       NO. GLOBAL 1 2 3 4 5
        1 1.00000 1.000 -0.446 -0.993 -0.859 -0.494
        2 0.99984 -0.446 1.000 0.545 -0.066 -0.530
        3 0.99989 -0.993 0.545 1.000 0.793 0.391
        4 1.00000 -0.859 -0.066 0.793 1.000 0.869
        5 0.99999 -0.494 -0.530 0.391 0.869 1.000
 ERR MATRIX APPROXIMATE
Info in <TMinuitMinimizer::Minimize>: Finished to run MIGRAD - status 4
Warning in <Fit>: Abnormal termination of minimization.
 FCN=38.2478 FROM MIGRAD STATUS=CALL LIMIT 1630 CALLS 1631 TOTAL
                     EDM=0.00988881 STRATEGY= 1 ERROR MATRIX UNCERTAINTY 14.5 per cent
  EXT PARAMETER PARABOLIC MINOS ERRORS        
  NO. NAME VALUE ERROR NEGATIVE POSITIVE   
   1 p0 3.02999e-01 1.08434e-01                            
   2 p1 3.72073e-01 3.38375e-02                            
   3 p2 8.84789e-03 1.12145e-02                            
   4 p3 1.22696e+00 6.50898e-02                            
   5 p4 1.43640e+01 2.63856e-01                            
i=0 (ERR, ERR^2)=(0.108434,0.011758).
i=1 (ERR, ERR^2)=(0.0338375,0.00114498).
i=2 (ERR, ERR^2)=(0.0112145,0.000125764).
i=3 (ERR, ERR^2)=(0.0650898,0.00423668).
i=4 (ERR, ERR^2)=(0.263856,0.0696199).
covariance matrix is

5x5 matrix is as follows

     | 0 | 1 | 2 | 3 | 4 |
----------------------------------------------------------------------
   0 | 0 0 0 0 0 
   1 | 0 0 0 0 0 
   2 | 0 0 0 0 0 
   3 | 0 0 0 0 0 
   4 | 0 0 0 0 0 

correlaton matrix is:

5x5 matrix is as follows

     | 0 | 1 | 2 | 3 | 4 |
----------------------------------------------------------------------
   0 | 0 0 0 0 0 
   1 | 0 0 0 0 0 
   2 | 0 0 0 0 0 
   3 | 0 0 0 0 0 
   4 | 0 0 0 0 0 

```

---

_[View the full topic](https://root-forum.cern.ch/t/why-do-i-keep-getting-a-zero-matrix-from-tfitresult-for-some-dataset-while-not-the-others/35107)._
