From: Patrick Alken <patrick.alken@colorado.edu>
To: gsl-discuss@sourceware.org
Subject: Re: computing R-squared with gsl_multifit
Date: Wed, 26 Sep 2007 16:20:00 -0000 [thread overview]
Message-ID: <20070926162005.GA27449@hippogriff.physics.drexel.edu> (raw)
In-Reply-To: <m3ps054e88.wl%bjg@network-theory.co.uk>
> A question: is the formula the same for both weighted and unweighted
> fits?
No, unfortunately.
R^2 = 1 - chisq / Sum [ w_i * (y_i - mean(y))^2 ].
In the case of weighted data, the mean(y) is also a weighted mean:
mean(y) = 1/sum [ w_i ] * sum [ w_i y_i ]
I looked at the GNU R source to verify all this.
>
> --
> Brian Gough
>
next prev parent reply other threads:[~2007-09-26 16:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-25 19:46 Patrick Alken
2007-09-26 15:52 ` Brian Gough
2007-09-26 16:18 ` Dirk Eddelbuettel
2007-09-26 16:26 ` Patrick Alken
2007-09-26 16:43 ` Dirk Eddelbuettel
2007-09-26 16:20 ` Patrick Alken [this message]
2007-10-02 8:35 ` Brian Gough
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070926162005.GA27449@hippogriff.physics.drexel.edu \
--to=patrick.alken@colorado.edu \
--cc=gsl-discuss@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).