Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #371 > unrolled thread
| Started by | David Marçal <davidufg@gmail.com> |
|---|---|
| First post | 2011-06-11 09:15 -0700 |
| Last post | 2012-07-14 18:29 +0200 |
| Articles | 8 — 3 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
Correlation coefficient David Marçal <davidufg@gmail.com> - 2011-06-11 09:15 -0700
Re: Correlation coefficient Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2011-06-11 18:49 +0200
Re: Correlation coefficient David Marçal <davidufg@gmail.com> - 2011-06-13 06:22 -0700
Re: Correlation coefficient Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2011-06-13 16:04 +0200
Re: Correlation coefficient David Marçal <davidufg@gmail.com> - 2011-06-14 07:11 -0700
Re: Correlation coefficient Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2011-06-15 00:16 +0200
Re: Correlation coefficient alexis.paz@gmail.com - 2012-07-14 08:37 -0700
Re: Correlation coefficient Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2012-07-14 18:29 +0200
| From | David Marçal <davidufg@gmail.com> |
|---|---|
| Date | 2011-06-11 09:15 -0700 |
| Subject | Correlation coefficient |
| Message-ID | <447e021d-67d8-4a1d-9268-67ddc983dc2a@j25g2000vbr.googlegroups.com> |
Hellow everyone! On gnuplot, when I make a fit linear, the log archive gives me a matrix of correlation instead of the correlation coefficent (R**2). How can I get correlation coefficient through the matrix of correlation? Thanks, David
[toc] | [next] | [standalone]
| From | Hans-Bernhard Bröker <HBBroeker@t-online.de> |
|---|---|
| Date | 2011-06-11 18:49 +0200 |
| Message-ID | <95hkj6Fi8eU1@mid.dfncis.de> |
| In reply to | #371 |
On 11.06.2011 18:15, David Marçal wrote: > On gnuplot, when I make a fit linear, the log archive gives me a > matrix of correlation instead of the correlation coefficent (R**2). Depending on what exactly you mean by that R**2, it's very well possible that it doesn't appear anywhere in the process, or output, of gnuplot's "fit" command, because that operates in an entirely different way than the one you're used to getting that value from. > How can I get correlation coefficient through the matrix of > correlation? The off-diagonal element in the matrix _is_ a coefficient of correlation. Whether or not it's the one you're looking for depends on which of several meaning of that terms you're looking for.
[toc] | [prev] | [next] | [standalone]
| From | David Marçal <davidufg@gmail.com> |
|---|---|
| Date | 2011-06-13 06:22 -0700 |
| Message-ID | <5f9b9ef2-4e51-4c6d-8951-83feb1b5e774@c20g2000vbv.googlegroups.com> |
| In reply to | #372 |
Thanks for answer Hans!
The correlation coefficient (R^2) is the Pearson's correlation
coefficient!
The output of gnuplot is something like this:
correlation matrix of the fit parameters:
a b
a 1.000
b -0.784 1.000
So, in a fit linear, my R^2 would be 0.784? This would be my
Perason correlation coefficient, is this correct?
Thanks again!
[toc] | [prev] | [next] | [standalone]
| From | Hans-Bernhard Bröker <HBBroeker@t-online.de> |
|---|---|
| Date | 2011-06-13 16:04 +0200 |
| Message-ID | <95mjm9F19cU1@mid.dfncis.de> |
| In reply to | #376 |
On 13.06.2011 15:22, David Marçal wrote: > The correlation coefficient (R^2) is the Pearson's correlation > coefficient! Of what? Since it didn't occur to you to specify that, I'll assume you mean the simplest use, which would be the number derived directly from x and y distributions: r_xy = Sum((x-<x>)(y-<y>))/sqrt(Sum((x-<x>)^2)*Sum((y-<y)^2)) > The output of gnuplot is something like this: > > correlation matrix of the fit parameters: > > a b > a 1.000 > b -0.784 1.000 > > So, in a fit linear, my R^2 would be 0.784? This would be my > Perason correlation coefficient, is this correct? Not really. The above is the correlation coefficient between a and b, not between the x and y columns of your data.
[toc] | [prev] | [next] | [standalone]
| From | David Marçal <davidufg@gmail.com> |
|---|---|
| Date | 2011-06-14 07:11 -0700 |
| Message-ID | <0fb8d538-97d6-455c-9f86-f8ecaf7a4583@b1g2000yql.googlegroups.com> |
| In reply to | #377 |
So, Gnuplot doesn't give me the r_xy coefficient! I made a FORTRAN program to calculate this r_xy for me, but I have to run the program for every fit linear I plot! I don't want to do this! Is there anyway to get this r_xy from Gnuplot or I have to run the FORTRAN program everytime? thanks
[toc] | [prev] | [next] | [standalone]
| From | Hans-Bernhard Bröker <HBBroeker@t-online.de> |
|---|---|
| Date | 2011-06-15 00:16 +0200 |
| Message-ID | <95q4sdF9m0U1@mid.dfncis.de> |
| In reply to | #380 |
On 14.06.2011 16:11, David Marçal wrote: > So, Gnuplot doesn't give me the r_xy coefficient! I made a FORTRAN > program to calculate this r_xy for me, but I have to run the program > for > every fit linear I plot! I don't want to do this! Is there anyway to > get this > r_xy from Gnuplot or I have to run the FORTRAN program everytime? The real issue is whether that r_xy is all that useful as you seem to think it is. Maybe you'ld be be better just not computing it at all?
[toc] | [prev] | [next] | [standalone]
| From | alexis.paz@gmail.com |
|---|---|
| Date | 2012-07-14 08:37 -0700 |
| Message-ID | <9012ddb5-61bd-43cd-a54b-364afbbbf9d8@googlegroups.com> |
| In reply to | #381 |
El martes, 14 de junio de 2011 19:16:20 UTC-3, Hans-Bernhard Bröker escribió: > On 14.06.2011 16:11, David Marçal wrote: > > > So, Gnuplot doesn't give me the r_xy coefficient! I made a FORTRAN > > program to calculate this r_xy for me, but I have to run the program > > for > > every fit linear I plot! I don't want to do this! Is there anyway to > > get this > > r_xy from Gnuplot or I have to run the FORTRAN program everytime? > > The real issue is whether that r_xy is all that useful as you seem to > think it is. Maybe you'ld be be better just not computing it at all? I think the problem is how compare the "goodness of fit" between two curves. The chisqure from the gnuplot depends on the magnitude on the axis. So if I compare two lineal fit with different magnitudes the chisqure will be different, also if the two fits look nice. Pearson coefficient could help us, but ¿how we can use the chisqure to do the comparision?. Im not know anything about statistic, so may be nice get a "recipe-like" solution. I beg your perdon for add a question and not an answer.
[toc] | [prev] | [next] | [standalone]
| From | Hans-Bernhard Bröker <HBBroeker@t-online.de> |
|---|---|
| Date | 2012-07-14 18:29 +0200 |
| Message-ID | <a6dl3uFfr5U1@mid.dfncis.de> |
| In reply to | #1269 |
On 14.07.2012 17:37, alexis.paz@gmail.com wrote: > El martes, 14 de junio de 2011 19:16:20 UTC-3, Hans-Bernhard Bröker > escribió: >> The real issue is whether that r_xy is all that useful as you seem >> to think it is. Maybe you'ld be be better just not computing >> it at all? You're aware that you're replying to a post that's over one year old, right? > I think the problem is how compare the "goodness of fit" between two > curves. The chisqure from the gnuplot depends on the magnitude on the > axis. Only if you neglect to specify properly scaled error bars --- if you're going to be that negligent, you shouldn't be expecting serious results from _any_ mathematical tool.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web