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

Home » Public Forums » archive » linfit and regress questions
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: linfit and regress questions [message #56766 is a reply to message #56693] Tue, 13 November 2007 08:14 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
rlayberry@hotmail.com writes:
> On 13 Nov, 03:16, Craig Markwardt
> <craigm...@REMOVEcow.physics.wisc.edu> wrote:
>> hradilv <hrad...@yahoo.com> writes:
>>
>>> Transform the data?
>>
>>> mhat = total(x*(y-c1))/total(x*x)
>>
>> Of course this all assumes the data are meant to be equally weighted
>> (no error bars, or all error bars are equal).
>>
>
> and does anyone know how the chi-sq or any other goodness of fit
> paramater would be calculated?

Do you mean, how to compute the chi-square value? Probably something
like,
TOTAL( ((Y-MHAT*X)/ERROR)^2 )

But you've never really specified what you are trying to do. Why not
just use a fitting program like MPFITFUN or CURVEFIT and specify
whatever model and/or error bars that you want?

Craig
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: how can I call idl function in other language program
Next Topic: Problem with PLOT_OO ticks

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

Current Time: Fri Oct 10 20:29:13 PDT 2025

Total time taken to generate the page: 1.36080 seconds