I've fitted some weighted data to a nonlinear model (namely a Sèrsic light profile), using least squares.

That is, I have fitted a weighted nonlinear least squares model of the form:

$$I_r = I_0 \exp\left[-\left(\frac{r}{\alpha}\right)^{1/n}\right]+\epsilon_r$$

where $I_0$, $α$ and $n$ are parameters.

How do I then find confidence limits for each parameter, i.e. the 1,2,3 sigmas?

## Best Answer

You can always fallback on

bootstrappedconfidence intervals.## Bootstrap resampling:

Let $X$ denote your training dataset. Let $n$ denote the number of samples in your training data. Let $k$ denote the number of resampling iterations you want to perform. The more the better, but $k$ should probably be no fewer than $1000$.

for $i=1,2,\dots k$, take a random sample $\tilde{X}_i$ (with replacement) of size $n$ from $X$. Train your model and calculate your model paramters. Let $\tilde{\theta}_i$ denote your fitted parameters trained on the $i^{th}$ resampled data set.

You can now calculate confidence intervals by determining the quantiles of $\tilde{\theta} = [\tilde{\theta}_1, \tilde{\theta}_2,\dots \tilde{\theta}_k]$. For example, to obtain a $95\%$ confidence interval, calculate the $2.5\%$ and $97.5\%$ quantiles of $\tilde{\theta}$.

For more on bootstrapping, reference chapters seven and eight of

The Elements of Statistical Learning(available for free download).