[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] GSL fit. Error estimates.

From: Brian Gough
Subject: Re: [Help-gsl] GSL fit. Error estimates.
Date: Mon, 18 Dec 2006 18:05:10 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20060815 SeaMonkey/1.0.4

Stanislav Vinogradov wrote:
I had used the gnuplot as well as the GSL facilities for
fitting my experimental data by power law y~ b*x^a.
When I approximate data by linear algorithm (in logarithmic variables) both gnuplot and GSL give the same results. But if data had been approximated directly by power law and nonlinear fitting algorithm, the GSL fit give the same results, as gnuplot, but with sufficiently greater error estimates. The heart is that in GSL, against to gnuplot, for poor fit (when the chi-squared per degree of freedom (dof) is greater then 1) errors obtained from the covariance matrix are scaled by factor sqrt(chi^2/dof)
So, what approach is more correct?


GSL only computes the covariance matrix in gsl_multifit_covar. It's up to the user whether they want to calculate the error with or without a scaling factor GSL_MAX_DBL(1, chi / sqrt(dof)).

The example program uses a scaling factor of sqrt(chisq / sqrt(dof)) but it's just an example. Personally I would recommend that choice, along with quoting the chisq/dof.

best regards,

Brian Gough
(GSL Maintainer)

Network Theory Ltd,
Publishing the GSL Manual -

reply via email to

[Prev in Thread] Current Thread [Next in Thread]