|
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:
|
[Prev in Thread] | Current Thread | [Next in Thread] |