I am doing a simple multi-non linear fit. I get the covariance matrix. Does anyone know how Mathematica calculate this Matrix? I have found the computation when mathematica fit only one signal but have not found any definition when I perform the multi signals case.
ClearAll["Global`*"]
time = {0, 1, 3, 5, 6, 7};
For[k = 1, k <= 10, k++,
data = Flatten[Table[{Exp[1.8 1 + 1.1 x] +
RandomVariate[NormalDistribution[0, 10]]}, {x, 1, 6}]];
data2 = Flatten[Table[{Exp[2 1 + 1.1 1.2 x] +
RandomVariate[NormalDistribution[0, 10]]}, {x, 1, 6}]];
]
model[a, b] = Exp[1.8 a + b x^2];
model2[a, b] = Exp[2 a + 1.2 b x^2];
Listdata = Table[{time[[i]], data[[i]]}, {i, 1, Length[time]}];
Listdata2 = Table[{time[[i]], data2[[i]]}, {i, 1, Length[time]}];
dataa = Join[{Listdata}, {Listdata2}];
fit = ResourceFunction["MultiNonlinearModelFit"][dataa, {model[a, b], model2[a, b]}, {a, b}, {x}, Method -> "LevenbergMarquardt", MaxIterations -> Infinity];
param = fit["BestFitParameters"]
covmat = fit["CovarianceMatrix"] // MatrixForm
Thanks, Edoardo