0
$\begingroup$

I have two groups of spectra, that could be viewed as a vectors with each wn corresponding to the vector's component. I'd like to quantify the difference between these two groups, and I tried to use linear model to express one group of vectored values as a function of the other vector values. So, I used lm function in R, but I don't know if I applied it correctly and how to make sense of it.

Here is the function:

summary(lm(spectra_group1 ~ spectra_group2))

For each vector within a group1 it gives a corresponding output:

enter image description here

I guess, it treats each spectrum as a $y_i$, in this instance, but in each spectrum there are over 3000 variables. So, I don't understand how it can reduce all these variables to just one $y_i$. Furthermore, in this example, there are several spectrum ( III, IX, XI - XIII) that have p-values significantly low. That would indicate, that they are correlated to the group1$spectrum_x. I would be glad, if someone could assist with ideas how to develop a method to quantify the differences between groups, possibly with some linear model. Thank you in advance.

$\endgroup$
  • $\begingroup$ Ordinarily one views a spectrum as a function (or as its Fourier transform) and employs a functional norm, such as a weighted $L^p$ norm, to measure how close two spectra may be. The choice of the norm depends on what your spectra mean and why you are comparing them. lm is not going to accomplish any of this for you. Thus, pursuing this question is likely going to be a dead end (or worse, will lead you astray). $\endgroup$ – whuber Nov 20 at 14:30
  • $\begingroup$ @whuber Ok, but that's just a way to measure a difference between two individual spectrums. But what a statistical method that can estimate the difference between groups? $\endgroup$ – Gianni D'Adova Nov 20 at 16:22
  • $\begingroup$ Statistics doesn't tell you how to compare spectra: physics does. Given a metric and a model for the variation within a spectra you will consider as "random" or inconsequential, statistics can help you decide whether to view two spectra as different or not. You need to supply that metric. $\endgroup$ – whuber Nov 23 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.