|
From: SB <ste...@gm...> - 2006-09-17 20:44:15
|
Hello, I try to fit linear or exponential functions to some data. The fitting procedure returns some statistics, but not the R². Can I calculate the R² (Bestimmtheitsmaß) from these values somehow in order to be able to compare the quality of my fits? If not, is there another easy way to do this? Thank you, Stepahn |
|
From: <br...@ph...> - 2006-09-18 03:44:19
|
SB wrote: > I try to fit linear or exponential functions to some data. The fitt= ing > procedure returns some statistics, but not the R=B2. >=20 > Can I calculate the R=B2 (Bestimmtheitsma=DF) from these values som= ehow in > order to be able to compare the quality of my fits?=20 Gnuplot prints out the correlation matrix. That should be all you ne= ed. |
|
From: SB <ste...@gm...> - 2006-09-18 17:52:53
|
Hello again,
Sorry, I have to ask the same question again.
After half a day on the web I learned a little about statistics, but I
couldn't find out how to interpret the correlation matrix. Also I am
still without ideas how to transform it to receive R².
Is there an easy explanation available for someone without prior
statistical knoledge how to do this?
And one more question:
My correlation Matrix looks like this:
a b
a 1.000
b -0.684 1.000
I did several fits to different data, and almost all fits to a line
(i.e. g(x) = a* x + b ; fit g(x) ... via a,b).
For some reason the bottom left value (in this case -0.684) seems to
depend only on the number of points that are fitted.
Confused,
Stephan
end part of one fitting log (g(x) fitted to 6 data points):
Iteration 5
WSSR : 16.6406 delta(WSSR)/WSSR : -5.61239e-12
delta(WSSR) : -9.33937e-11 limit for stopping : 1e-05
lambda : 0.000319372
resultant parameter values
a = 0.451348
b = 1.72651
After 5 iterations the fit converged.
final sum of squares of residuals : 16.6406
rel. change during last iteration : -5.61239e-12
degrees of freedom (ndf) : 4
rms of residuals (stdfit) = sqrt(WSSR/ndf) : 2.03965
variance of residuals (reduced chisquare) = WSSR/ndf : 4.16016
Final set of parameters Asymptotic Standard Error
======================= ==========================
a = 0.451348 +/- 0.02527 (5.599%)
b = 1.72651 +/- 1.141 (66.09%)
correlation matrix of the fit parameters:
a b
a 1.000
b -0.684 1.000
----------------------------------
G N U P L O T
Version 4.0 patchlevel 0
last modified Thu Apr 15 14:44:22 CEST 2004
System: Linux 2.6.12-10-386
Copyright (C) 1986 - 1993, 1998, 2004
Thomas Williams, Colin Kelley and many others
|
|
From: Thomas P. <jun...@gm...> - 2006-09-18 18:23:15
|
Hi, even if this is NOT a math-forum .... If you have questions about statistics, wolfram's mathworld is always a go= od start: http://mathworld.wolfram.com/CorrelationCoefficient.html If that's too strange, well I would suggest grab some statistics books and= study through. Correlation matrix and R-square is certainly in the first quarter ... If you use them you should understand there meaning. Cheers Pelusa On 18 Sep 2006 at 19:54, SB wrote: > Hello again, > Sorry, I have to ask the same question again. > > After half a day on the web I learned a little about statistics, but I > couldn't find out how to interpret the correlation matrix. Also I am > still without ideas how to transform it to receive R=B2. > > Is there an easy explanation available for someone without prior > statistical knoledge how to do this? > > And one more question: > My correlation Matrix looks like this: > > a b > a 1.000 > b -0.684 1.000 > > I did several fits to different data, and almost all fits to a line > (i.e. g(x) =3D a* x + b ; fit g(x) ... via a,b). > For some reason the bottom left value (in this case -0.684) seems to > depend only on the number of points that are fitted. > > Confused, > > Stephan > > end part of one fitting log (g(x) fitted to 6 data points): > > > > Iteration 5 > WSSR : 16.6406 delta(WSSR)/WSSR : -5.61239e-12 > delta(WSSR) : -9.33937e-11 limit for stopping : 1e-05 > lambda : 0.000319372 > > resultant parameter values > > a =3D 0.451348 > b =3D 1.72651 > > After 5 iterations the fit converged. > final sum of squares of residuals : 16.6406 > rel. change during last iteration : -5.61239e-12 > > degrees of freedom (ndf) : 4 > rms of residuals (stdfit) =3D sqrt(WSSR/ndf) : 2.03965 > variance of residuals (reduced chisquare) =3D WSSR/ndf : 4.16016 > > Final set of parameters Asymptotic Standard Error > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > > a =3D 0.451348 +/- 0.02527 (5.599%) > b =3D 1.72651 +/- 1.141 (66.09%) > > > correlation matrix of the fit parameters: > > a b > a 1.000 > b -0.684 1.000 > > > ---------------------------------- > G N U P L O T > Version 4.0 patchlevel 0 > last modified Thu Apr 15 14:44:22 CEST 2004 > System: Linux 2.6.12-10-386 > > Copyright (C) 1986 - 1993, 1998, 2004 > Thomas Williams, Colin Kelley and many others > > > > > > ------------------------------------------------------------------------= - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share = your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Gnuplot-info mailing list > Gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > |
|
From: <br...@ph...> - 2006-09-18 19:34:59
|
SB wrote: > After half a day on the web I learned a little about statistics, bu= t I > couldn't find out how to interpret the correlation matrix. Also I a= m > still without ideas how to transform it to receive R=B2.=20 Well, to cut a long story short: R^2 is the square of the off-diagona= l=20 element of the correlation matrix --- *iff* the fit is a simple linea= r=20 regression: y =3D a*x + b > For some reason the bottom left value (in this case -0.684) seems t= o > depend only on the number of points that are fitted.=20 Then I must assume you didn't try sufficiently diverse data sets. The correlation should only depend on the number of data points if yo= u=20 varied the data set size by restricting the x or y range of a linearl= y=20 ordered data set. |