Message Boards Message Boards

What exactly is "Standard Error" in the Parameter Table of LinearModelFit?

Posted 4 years ago

I'm fitting a model to some data, in this case I'm using LinearModelFit but I think it also applies to NonlinearModelFit as well. When I extract the fit parameters from the model, I can extract the Standard Error for each parameter. Is this the "standard deviation" of the parameter? Or is it a true "standard error" (i.e. standard deviation divided by the square root of the population size)? Or is it something else?

I want to propagate this extracted uncertainty through subsequent calculations. Specifically, I will use the Around function (i.e. Around[data,error]) to match up the parameters with their uncertainty. Do I have to perform some operation on the Standard Error I extract from the model before I can use it like this?

Thanks in advance!

POSTED BY: Ian Smith

I'm trying to learn statistics myself, so this answer will be far from complete, but might help point you in the right direction until (hopefully) somebody more knowledgable answers.

The standard error of each parameter, like the standard error of the sample mean, is an estimate of the standard deviation of its sampling distribution. In the case of the standard error of the parameter the calculation is not so simple as dividing by the square root of the sample size. Equations (22) and (23) of this link give the formulae for the intercept and slope parameters in simple linear regression.

For propagating the uncertainty using Around, I think that the correct way to do it would be to extract the parameter confidence interval from your fitted model, which should be a list of two values {confMin, confMax} for each parameter. The standard errors for the parameters follow a Student's T distribution, so the confidence intervals are symmetrical, therefore this should give you the parameter with uncertainty:

Around[Mean@{confMin,confMax},(confMax-confMin)/2]

As an aside, if anyone from Wolfram Research is reading, the above post touches on a pain point in using Mathematica for statistics. It can at times be very difficult to discover the mathematical definition of named statistics (e.g. the parameter's standard error) from the documentation. Sometimes this is compounded by a particular named statistic having various different formulae associated with it depending upon the textbook or software package used, leaving the user unsure of which implementation Wolfram is using. This contrasts to R where the source code can be referred to.

It would be very helpful for the long term if Wolfram could, for example, make each formula it uses explicitly available by linking from a super-function's documentation to a page in a formula repository where the formula would be clearly stated in both mathematical language and Wolfram code.

POSTED BY: Robert Ferguson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract