Effacer les filtres
Effacer les filtres

Confidence intervals from fit

2 vues (au cours des 30 derniers jours)
Karl
Karl le 14 Août 2014
Commenté : Karl le 14 Août 2014
Hi, I'm currently trying to fit my data to the model y = a*(1-exp(x/b)), and extract the two constants a and b. I'm currently using simulated data where I set a = 1 and generate some points y and add gaussian white noise to them. If I then put these data points into the curve fitting toolbox and fit to y = 1-exp(x/b) I get a reasonably good fit I get b = 1.328 (I put in 1.1) with a 95% confidence interval of (1.035,1.621) and an R^2 of 0.9066. If I allow a to vary with the same data I get a = 0.9821, with a 95% CI of (0.8541,1.108), and b = 1.261 with a CI of (0.7102,1.811) and an R^2 of 0.91, so the fit got a little better but it's pretty close, since a only changed by about 2%.
What you'll notice now though is the CI for b has about doubled, even though a is about the same. I remember reading a long time ago about how the CIs were correlated and it could give artificially large confidence intervals when fitting with multiple parameters, but I don't know where I read that (or if that's even true!). Does anyone have any information on where this large discrepancy comes from, and how I could fix it? The reason why I ask is because with my actual data I will not "know" a, as i did with my generated data, so I will have to fit it into my model. An easy solution would be to fit it, extract a and then simple set a in the fit instead of allowing it to vary, but I worry this isn't 100% justified.
In short I believe that I am getting larger CIs when fitting to multiple parameters than I would expect and was wondering if there is a way to correct for this
  4 commentaires
dpb
dpb le 14 Août 2014
How many DOF are there (iow, how many points in the data set)?
Karl
Karl le 14 Août 2014
Hi, I used 8 data points.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Least Squares dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by