Group Abstract Group Abstract

Message Boards Message Boards

Obtain proper errors on fitted parameters?

Hello everyone, I apologize if this is a trivial question, but I have been looking for an answer for a long time and I didn't manage to find any. My problem is the following: I have a set of data, tmpdata, and a set of experimental errors on these data, tmperr. I am performing a fit with a certain fitting function fitfunc[q] and I would like to know how to estimate the errors on the fitted parameters. In particular, since this is an experimental measurement I want the errors on the parameters to be solely determined by the errors on the data.

Right now I am doing the following:

fitG = 
  NonlinearModelFit[tmpdata, fitfunc[q], param, {q}, 
   Weights -> 1/tmperr^2];

Is this the right way to proceed? I also found that I might have to use the VarianceEstimatorFunction option. However, it is not clear to me how I should use it and if it is necessary.

Can anyone help me out?

Thanks a lot!

POSTED BY: Angelo Esposito
5 Replies

Thanks Jason but that's not what I meant. I know how to access the parameters and their errors. Mine is a question about what is the procedure to obtain the right errors given my uncertainties.

POSTED BY: Angelo Esposito

Sorry about that. Does this page answer your question? According to that page, you want to use the option Weights -> 1/errors^2, VarianceEstimatorFunction -> (1 &)

POSTED BY: Jason Biggs

Mmmmh that a good reference, thanks! I am not sure I understand why that should be the right way though... any idea? Thanks again!

POSTED BY: Angelo Esposito

You said

I want the errors on the parameters to be solely determined by the errors on the data

and on the linked page it says

For measurement errors, you want standard errors to be computed only from the weights and so the variance estimate should be the constant 1

I could be wrong - I'm a theoretical chemist, with little experience with using actual data......

POSTED BY: Jason Biggs

With the code you have, you should look at

fitG["ParameterTable"]

and you can get the errors directly via

fitG["ParameterErrors"]
POSTED BY: Jason Biggs
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard