Minuit, correlation matrix when some parameters are fixed

Dear Root team,

I get the correlation matrix with the following code:

 correlation_matrix = new double[number_of_parameters*number_of_parameters];

 gMinuit->mnemat (correlation_matrix, number_of_parameters);

Consider this example with 3 fixed parameters:

 FCN=25.0296 FROM MIGRAD    STATUS=CONVERGED     159 CALLS         160 TOTAL
                     EDM=1.76359e-10    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  normalisation   5.45620e+00   7.27962e-01   2.65966e-06  -7.78900e-03
   2  mean         3.09072e+00     fixed    
   3  sigma        5.31116e-02     fixed    
   4  constant     1.39707e+01   6.89228e-01   1.68089e-03   9.08073e-06
   5  slope       -2.33399e-11   4.22742e-01   3.24051e-04** at limit **
   6  correction   0.00000e+00     fixed    

Correlation matrix:
           0         1         2         3         4         5

Firstly, I noticed in the case where some parameters are fixed the correlation matrix is reduced, which is not documented. And not easy to manage.

Moreover, I can only verified by hand “normalisation” and “constant”, but not the last “slope”.

> $e=7.27962e-01 ;sprintf("%.2e", ($e)**2)
 =  5.30e-01

> $e=0.68922756632699 ;sprintf("%.2e", ($e)**2)
 =  4.75e-01

> $e=0.422741590148873 ;sprintf("%.2e", ($e)**2)
 =  1.79e-01

The matrix seems right until 1, and symetric until 2.

What’s happen?

Hi Fabrice,

The correlation matrix is for the free parameters only !
So indeed a 3 x3 matrix in your case .

Internally, the minimization engine is only aware of free
parameters . One can translate these numbers to the
user index through the TMinuit data member Int_t *fNexofi .

So in your case gMinuit->fNexofi[i] where i = 0,1,2 .

To translate in the other direction use Int_t *fNiofex , which contains
a zero for a fixed parameter and otherwise the internal number .

The slope parameter seems to be stuck at a parameter limit, here
the error calculation/interpretation is different (I believe), see manual .