The basic fit command is called fit. This command performs a minimization using the Levenberg-Marquardt algorithm. fit can take two arguments, those being 1) the number of iterations to be performed before the user is asked whether to continue; and 2) the change in fit statistic that defines convergence. The fit statistics available within XSPEC are the and C statistics: the statistic command specifies which one is to be used. Other fit-minimization algorithms are available, and can be selected using the method command. For non-background-subtracted data the goodness command does a Monte Carlo calculation of the goodness-of-fit. The weighting algorithm used to calculate can be altered by the weight command. A systematic model uncertainty can be included using the the systematic command.
The error or uncertain command calculates error bounds for one interesting parameter for the specified parameters and confidence levels. To produce multi-dimensional errors the steppar command is used to generate a fit-statistic grid. Two-dimensional grids may be expressed as contour plots. The model normalization can be set using the renorm command. The normalization of the correction file background can be set with cornorm, and can be set to minimize the fit statistic with recornorm. The gain of the response matrix can be adjusted using the gain command, which includes an option to fit for the gain.