# Is it possible to marginalize one or several parameters obtained from fitting procedure?

Statistical model analysis package has a few fitting functions. Their arguments are data points, fitting model and parameters in the fit. The result is a set of best values for parameters, which represent the "BestFit" to the data. However, one can also specify the ConfidenceLevel and obtain "ConfidenceInterval" for every parameter, or the total "ParameterConfidenceRegion" for all parameters. This region will be an n-dimensional ellipsoid, for the fit with n parameters.

If you are not interested in one of parameters you could marginalize it, e.g. integrate the likelihood function over all values of that parameter, ending up with n-1 parameters. If you could do this for all but one parameter you would reach to the same "ConfidenceInterval" that Mathematica has calculated for that parameter. But if one could do this for only p parameters, one would end up with n-p parameters and the "ParameterConfidenceRegion" would be n-p dimensional ellipsoid.

Marginalization in terms of "CovarianceMatrix" is very simple - remove row and column that correspond to the parameter you want to marginalize.

Now I don't know how to get "ParameterConfidenceRegion" from this modified "CovarianceMatrix" and I don't know if Mathematica has something for parametric marginalization implemented.

• Depending on your distribution you could look at the profile likelihood, that is the likelihood where you fix some prameters, the deviance statistic 2(l(best fit) - l(theta | best fit of some parameters)) which will have the chi-square(number of free parameters) distribution so you can check where the deviance statistics attains relevant quantile of the chi-square distribution. en.wikipedia.org/wiki/Deviance_%28statistics%29 – ssch Apr 17 '13 at 22:42
• Here is explained how one can plot confidence region from any covariance matrix c. Now I am trying to figure out how to get standard equation of ellipsoid from {x, y, z}.ci.{x, y, z} == t, where ci is the inverse of c. This would help in analytical analysis and make the plotting easier and prettier. Position of ellipsoid is given from Eigenvectors[c], but I am still missing radii. Different confidence level would influence the size of ellipsoid by scale factor Sqrt@InverseCDF[ChiSquareDistribution[n], confidenceLevel]. – Vladimir Apr 19 '13 at 22:46