Correlation (R2) between two plots

I have two sets of data, one is generated from experiment an another is from calculation using some curve fitting. I want two know the correlation (R2) value of this two sets of data.
Short Answer: It sounds as though what you want to do is either the wrong thing to do from first principles or the wrong way to do it in practice.

Is this a set of data fit by a line? If so, you can obtain an R^2 coefficient from the curve fitting methods in Igor. For one model fit in a linear regression, you would be far better to report the uncertainties on the slope and intercept of the line that you fit to the experimental data.

Perhaps you are trying to fit experimental data by a model curve. In this case, R^2 has an unreliable and ambiguous meaning, if not being totally meaningless. You would be far better to report the chi^2 uncertainty value and/or the uncertainty values on the fitting coefficients.

In case you were unaware, you can fit your experimental data in Igor to almost any function that you can define. You need not try to fit an experimental data set by a separate theoretical data set. Igor will generate the theoretical curve for you.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
I am a new user of Igor, I really don't know how to get the chi^2 value. I have one set of X data, and two sets of Y data, I want to get this thing for this two Y data value.
tsaha wrote:
I am a new user of Igor, I really don't know how to get the chi^2 value.


Basically, chi^2 is a value that is minimized to optimize a fit. It is printed as part of Igor's standard output after you would do a curve fit.

tsaha wrote:
I have one set of X data, and two sets of Y data, I want to get this thing for this two Y data value.


Why? Please explain why you insist that you must have R^2. Again, my concern is, you are doing the wrong type of calculation. Can you explain the physical system you have measured to give you the experimental data and the theoretical data. What fundamental equation represents your theoretical data? What equation do you think should fit your theoretical data set to the experimental data set?

In the meantime, you should also read the chapter on curve fitting and do some of the corresponding curve fitting tutorials in Igor Pro. Any answer that someone might try to give you to do your analysis will require that you have some of this information covered already. The analysis you want to do is going to be more effort than just a "load your two data sets in to Igor, push a button, and get a number". The other bad news is, you may also have a bit of additional reading to understand the fundamental principles of curve fitting in the right way. The really good news is, once you get all this information clear in your head, Igor can handle anything that you need to do with your data and can do it in a rigorous way that stands the test of first-principles analysis for curve fitting.

So, help us better understand what your problem really involves, and we can help you solve it effectively and in the right way.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville