On Wed, Sep 26, 2007 at 04:51:19PM +0100, Brian Gough wrote: > At Tue, 25 Sep 2007 13:46:28 -0600, > Patrick Alken wrote: > > Computing the value would require adding about 4-5 lines of > > code and it can be computed at the same time as chisq so there > > doesn't have to be an extra loop added in. > > Hello, > > I think I'd prefer not to have results passed back through the > workspace, it's not really part of the design -- a separate function > is better, as for the correlation coefficient. > > A question: is the formula the same for both weighted and unweighted > fits?
Yes, as it relates 'explained sum of squares' to 'total sum of squares', so it just uses residuals, irrespective of whether these were computed with a unit vector of weights, or with actual weights. Wikipedia is not a bad start: http://en.wikipedia.org/wiki/R-squared Hth, Dirk -- Three out of two people have difficulties with fractions.
