help-octave
[Top][All Lists]
Advanced

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

Re: Use leasqr.m in octave to fit data with error


From: Oanh Nguyen
Subject: Re: Use leasqr.m in octave to fit data with error
Date: Thu, 9 Apr 2009 13:06:17 -0700 (PDT)

As I understood after skimming throught the code, it is very easy to extract Chi-squared since it was already there.. You can simply add the variable "sbest" (or "ss") to the output list than you have total chi-squared sum. After that if you want "Chi-squared / No. of degree of freedom", you just do a divison. I am not 100% sure for this issue because I have not had enough time to read the code carefully.
 
I just changed one line in the code from:
...
function [f,p,kvg,iter,corp,covp,covr,stdresid,Z,r2]= ...
      leasqr(x,y,pin,F,stol,niter,wt,dp,dFdp,options)
....
to:
 
function [f,p,kvg,iter,corp,covp,covr,stdresid,Z,r2,sbest]= ...
      leasqr(x,y,pin,F,stol,niter,wt,dp,dFdp,options)

Best Regards,

--- On Thu, 4/9/09, Francesco Potorti` <address@hidden> wrote:

From: Francesco Potorti` <address@hidden>
Subject: Re: Use leasqr.m in octave to fit data with error
To: "Oanh Nguyen" <address@hidden>
Cc: address@hidden
Date: Thursday, April 9, 2009, 6:18 PM

>Thank you very much. I read the code and found that chi2 out put has
>been removed. Thus I have to add some piece of code to get what I want.

Once you manage to get what you want, possibly in a generically useful
way, would you consider submitting a patch, for boh the code and the
documentation?

--
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: address@hidden
(entrance 20, 1st floor, room C71)     Web:   http://fly.isti.cnr.it/


reply via email to

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