Comparing Near-Infrared Spectra: What Stat Method?

In summary: MATLAB's corrcoef function can be used to calculate the correlation coefficient between two spectra. This function takes two input spectra and calculates the correlation coefficient between the two. The correlation coefficient is a measure of the degree to which the two spectra are related. The closer the correlation coefficient is to 1, the more closely the spectra are related.Pearson correlation is a common statistic used to measure the linear relationship between two variables. This statistic is calculated by taking the Pearson product-moment correlation between the two variables and is represented by the symbol r. Pearson correlation is accurate when the data is linearly correlated, but it is not accurate when the data is not linearly correlated. MATLAB's corr
  • #1
groot44
6
2
I'd like to compare 2 or more near-infrared spectra. The data consists of measured light intensity in different wavelengths (range 600 nm to 1100 nm).

I'm wondering which statistical method would be appropriate? I noticed when searching online that pearson correlation might be inaccurate as it's used for linear correlation. However, when experimenting with MATLAB's function corrcoef, I get pretty accurate results when comparing visually spectra. But still unsure if some other method would be better in this case so thoughts on the matter would be highly appreciated, thanks!

Attached example of the data to be compared.
 

Attachments

  • Screenshot 2021-09-17 at 10.45.11.png
    Screenshot 2021-09-17 at 10.45.11.png
    7.8 KB · Views: 94
Biology news on Phys.org
  • #2
groot44 said:
I'd like to compare 2 or more near-infrared spectra.
What do you mean by "compare" in this context? What would the comparison say about the signals?
 
  • Like
Likes groot44
  • #3
Dale said:
What do you mean by "compare" in this context? What would the comparison say about the signals?

Good question. I’d like to compare the shape of spectra. Comparison would say in this context how similar the shapes of the spectra are.
 
  • #4
I assume each spectrum is background subtracted when taken.
My first attempt would be to narrowly as possible define the wavelength region of interest and normalize each curve to that region. Look at the results. If you want a single number for compare, the RMS summed deviation is then convenient. How clever do you need to be?
 
  • #5
groot44 said:
Good question. I’d like to compare the shape of spectra. Comparison would say in this context how similar the shapes of the spectra are.
I don't know too much about shape metrics. Here is a paper about shape similarity measures:

https://citeseerx.ist.psu.edu/viewd...measure between,parts of both compared shapes.

Once you have computed the appropriate shape metric then you could do a standard statistical measurement like the t-test to see if the difference in shapes according to these metrics is significantly different from zero.

Alternatively, if you have some model of the shape of the spectra then you could fit each spectrum to the model and get some confidence intervals for the parameters. Then you could check for similarity by comparing the parameters.
 
  • Like
Likes jim mcnamara and hutchphd
  • #6
groot44 said:
I'm wondering which statistical method would be appropriate? I noticed when searching online that pearson correlation might be inaccurate as it's used for linear correlation.
In your data, you expect to see a linear correlation between the spectra of the two compounds. For wavelengths, where you see high absorbance for the first compound, you expect to see high absorbance for the second compound and vice versa for wavelengths were you see low absorbance for the first compound. The absorbance is not linearly correlated with wavelength, but that doesn't matter as you're measuring the correlation between the absorbance of two compounds. (Nevertheless, whenever calculating the correlation coefficient, it's always helpful to make a scatterplot of the data to see whether the relationship is linear or more complicated).
 
  • Like
Likes jim mcnamara

1. What is near-infrared spectroscopy?

Near-infrared spectroscopy is a scientific technique used to analyze the chemical composition of a sample by measuring the absorption of near-infrared light. This method is commonly used in fields such as chemistry, biology, and pharmaceuticals.

2. How is near-infrared spectroscopy used in comparing spectra?

Near-infrared spectroscopy can be used to compare the spectra of two or more samples to determine their similarities and differences. This is typically done by plotting the spectra and analyzing the peaks and patterns to identify any variations.

3. What is the purpose of comparing near-infrared spectra?

The purpose of comparing near-infrared spectra is to gain insight into the chemical composition of different samples. This can be useful in industries such as food and beverage, pharmaceuticals, and environmental testing.

4. What statistical methods are commonly used in comparing near-infrared spectra?

Some common statistical methods used in comparing near-infrared spectra include principal component analysis (PCA), partial least squares (PLS), and cluster analysis. These methods help to identify patterns and relationships between different spectra.

5. What are the benefits of using near-infrared spectroscopy for comparing spectra?

Near-infrared spectroscopy is a non-destructive and rapid method for comparing spectra, making it a valuable tool in various industries. It also requires minimal sample preparation and can provide quantitative and qualitative data, making it a versatile analytical technique.

Similar threads

Replies
152
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
19
Views
2K
  • STEM Academic Advising
Replies
13
Views
2K
  • Biology and Medical
Replies
6
Views
5K
  • General Math
Replies
13
Views
9K
Back
Top