Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #794
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!f33g2000yqh.googlegroups.com!not-for-mail |
|---|---|
| From | Mike <mesimms@gmail.com> |
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Calculate R-squared value from gnuplot 'fit' output? |
| Date | Wed, 28 Dec 2011 12:14:18 -0800 (PST) |
| Organization | http://groups.google.com |
| Lines | 52 |
| Message-ID | <9d8f352e-5f07-45c2-8eee-1fa5c58eeba0@f33g2000yqh.googlegroups.com> (permalink) |
| NNTP-Posting-Host | 81.32.1.42 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Trace | posting.google.com 1325103258 1826 127.0.0.1 (28 Dec 2011 20:14:18 GMT) |
| X-Complaints-To | groups-abuse@google.com |
| NNTP-Posting-Date | Wed, 28 Dec 2011 20:14:18 +0000 (UTC) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | f33g2000yqh.googlegroups.com; posting-host=81.32.1.42; posting-account=gP2fTgoAAABha9kp8QYA7fOu0oWilFqr |
| User-Agent | G2/1.0 |
| X-Google-Web-Client | true |
| X-Google-Header-Order | HUALESNKRC |
| X-HTTP-UserAgent | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111107 Ubuntu/10.10 (maverick) Firefox/3.6.24,gzip(gfe) |
| Xref | x330-a1.tempe.blueboxinc.net comp.graphics.apps.gnuplot:794 |
Show key headers only | View raw
OK, my statistics is perhaps not what it should be. I have a script
make a linear fit of some x-y pairs:
#
# Correlations
#
set xdata
set format x
set term png size 400, 400
f(x) = m*x + b
set output "./corr-00.png"
fit f(x) "2011-10.dat" using 2:3 via m,b
plot "2011-10.dat" using 2:3 t "C1 vs C2" with dots, f(x) title "Model
Fit"
And I get the following output, just showing the end here:
Iteration 0
WSSR : 9404.93 delta(WSSR)/WSSR : 0
delta(WSSR) : 0 limit for stopping : 1e-05
lambda : 7.53716
After 3 iterations the fit converged.
final sum of squares of residuals : 1980.57
rel. change during last iteration : -5.27226e-11
degrees of freedom (FIT_NDF) : 4462
rms of residuals (FIT_STDFIT) = sqrt(WSSR/ndf) : 0.66624
variance of residuals (reduced-chisquare) = WSSR/ndf : 0.443875
Final set of parameters Asymptotic Standard Error
======================= ==========================
m = 0.889071 +/- 0.002949 (0.3317%)
b = 0.881951 +/- 0.03129 (3.548%)
correlation matrix of the fit parameters:
m b
m 1.000
b -0.948 1.000
Shouldn't I be able to calculate the R-squared value from this data? I
read in wikipedia that
R^2 1 - (SS_err / SS_tot)
and that WSSR is SS_err, as far as I can make out. Can anyone help me
with SS_tot or another way to do it?
Thanks!
Back to comp.graphics.apps.gnuplot | Previous | Next — Next in thread | Find similar
Calculate R-squared value from gnuplot 'fit' output? Mike <mesimms@gmail.com> - 2011-12-28 12:14 -0800
Re: Calculate R-squared value from gnuplot 'fit' output? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2011-12-28 22:11 +0100
Re: Calculate R-squared value from gnuplot 'fit' output? wolfgang <cmat.wolfgang@gmail.com> - 2011-12-29 00:17 -0800
Re: Calculate R-squared value from gnuplot 'fit' output? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2011-12-29 12:39 +0100
Re: Calculate R-squared value from gnuplot 'fit' output? ab <ab.3942@googlemail.com> - 2012-01-02 00:37 -0800
csiph-web