I need some help with statistical analysis on some data from raman spectroscopy.
I need a statistical value that shows the "goodness of fit" between the collected values and the curve-fit values. Would it be chi-squared test, or population variance where mu is taken to be the curve-fit values? My adviser said to find the R-squared value but she must not know what she's talking about since I would have to have a linear or power law function in order to do so.
Please help.
Column A is the x-axis values, column B is the actual intensity values collected and column C is the curve-fit values corresponding to B.
>>9150552
That depends on how your fitted curve is constructed. Could you shed any light on that?
you're right, there is no r-squared value for nonlinear data.
there really isn't a simple way to do this unfortunately. there ARE various tests you can do to demonstrate difference from a given distribution, but similarity is a tough thing to demonstrate
>>9150571
Parameters for the curve-fit:
Center - 489.4
Width - 40.4
Height - 1453.2
% Gaussian - 84.5
Area - 67085.4
Would it be better if the curve-fit is 100% Gaussian or Lorentzian? The problem with that is the the fit does not come out as well
>>9150573
Is there any meaningful test I can do?
I need to show that the curve-fit remains suitable across a number of collected spectra
>>9150592
honestly, the question is kinda fucked anyway - you fit a curve, and then you're asking how well you fit the curve. that's not really a useful thing to ask, because by definition you were trying to fit the curve as well as you could.
my gut feeling is you'll need something like a KS test or other related tests - https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test
>>9150601
Yeah, that's how I feel about this too. My adviser is asking me to do this, but I think she is confused.
I suppose she is looking for confirmation that the data is not noisy, but after baseline substraction, it seems pretty obvious that it isn't.
>>9150642
it wouldn't be a perfect solution, but maybe you could use a maximum likelihood estimator to show that the new curve fit to the new data is better than the old curve fit to the new data?
you're still not producing any kind of p-value or r2-value, but you can at least do better than eyeballing it
>>9150552
Use something like the Kullback-Leibler divergence or conditional entropy. Something like [math]-\frac{1}{N} \sum N(x) \log p(x) - H(p)[/math] where N(x) is the number of occurrences of x, or the intensity of x, in the sample set (with sum N), p is the distribution you're fitting the data to and H(p) is its entropy.
For a normal distribution, you can simplify this expression using
[eqn]-\log p(x) = \frac{(x-\mu)^2}{2 \sigma^2} + \frac{1}{2} \log (2 \pi \sigma^2)[/eqn]
to give
[eqn]-\frac{1}{N} \sum N(x) \log p(x) - H(p) = \frac{s^2+(m-\mu)^2}{2 \sigma^2} + \frac{1}{2} \log (2 \pi \sigma^2) - \frac{1}{2} \log (2 \pi e \sigma^2) = \frac{s^2+(m-\mu)^2}{2 \sigma^2} + \frac{1}{2},[/eqn]
where m and s^2 are the sample mean and (biased) variance, and the sample expectation of the square error from mu follows from the bias-variance decomposition. If you add H(p) to this value, you get an expression with minimum at the MLE fit for the data.
>>9151501
Thank you for your response!
Bumping so I can refer to it later