comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: doubt in chisq value
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: doubt in chisq value [message #73213] Mon, 01 November 2010 07:48 Go to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Nov 1, 2:43 am, sid <gunvicsi...@gmail.com> wrote:
> Hi,
>     I am fitting my data with svdfit (2 degree polynomial), now I need
> to know how exactly the chisq value is calculated in this routine,
> because I need to know the goodness of fit. For my data which I am
> fitting I am getting chisq values which varies from 6.3534419e-07 to
> 8.0278877e-09 for different datasets. But please help how the routine
> is performing the chisq calculation and how can I find the goodness of
> fit from it.
> thanking you
> sid

You are almost certainly supplying unrealistic error bars (sigma
values).
Chisq can be calculated from the single line (e.g. see curvefit.pro)

chisq = total(Weights*(y-yfit)^2)/nfree

where weights = 1/sigma^2 , and nfree is the number of data points
minus the number of free parameters.

--Wayne
Re: doubt in chisq value [message #73349 is a reply to message #73213] Tue, 02 November 2010 00:29 Go to previous message
sid is currently offline  sid
Messages: 50
Registered: January 1995
Member
On Nov 1, 7:48 pm, wlandsman <wlands...@gmail.com> wrote:
> On Nov 1, 2:43 am, sid <gunvicsi...@gmail.com> wrote:
>
>> Hi,
>>     I am fitting my data with svdfit (2 degree polynomial), now I need
>> to know how exactly the chisq value is calculated in this routine,
>> because I need to know the goodness of fit. For my data which I am
>> fitting I am getting chisq values which varies from 6.3534419e-07 to
>> 8.0278877e-09 for different datasets. But please help how the routine
>> is performing the chisq calculation and how can I find the goodness of
>> fit from it.
>> thanking you
>> sid
>
> You are almost certainly supplying unrealistic error bars (sigma
> values).
> Chisq can be calculated from the single line (e.g. see curvefit.pro)
>
> chisq = total(Weights*(y-yfit)^2)/nfree
>
> where weights = 1/sigma^2 , and nfree is the number of data points
> minus the number of free parameters.
>
> --Wayne

Does the sigma value denote the error in each y value? If so can you
suggest me how to find the error for each y value, mine is a spectral
data. I am fitting a spectral line with 2 degree polynomial.
thanking you
sid
sid
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Subtracting arrays of same dimension, different size - interpolating one to fit the other
Next Topic: Re: Feature identification and measurement

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:06:04 PDT 2025

Total time taken to generate the page: 0.00666 seconds