13 jun. 2016

Working with the Shootout 2016 data with R (Part 2)

One of the samples in the instrument A2 is a clear outlier and should be removed. Before to proceed we have to apply a math treatment to remove the scatter so we can compare better the spectra of the same samples scanned on the 3 instruments of the same manufacturers, in this case with the instruments A1 , A2 and A3 of the manufacturer A.

I choose in this case MSC. After applying the MSC I could overplot the spectra of all these instruments, but we won´t see clearly the differences, so the best way to see the spectral differences is to substract the spectra from the samples scanned on one instrument from the spectra of samples scanned in the others, so in this case I can subtract A1 –A2, A1 – A3 and A2 – A3, and to look to the patterns of the spectra.

We can see that when instrument A2 is involved strange difference spectra appears, so this sample will be removed from all the calibration sets from instruments of Manufacturer A.

CalA1A2<-CalSetA1_tC_spec_msc - CalSetA2_tC_spec_msc
matplot(wavelengths_C,t(CalA1A2),lty=1,type="l",
+ pch=NULL,xlab="nm",ylab="abs",col="red",main="A1-A2")
CalA1A3<-CalSetA1_tC_spec_msc - CalSetA3_tC_spec_msc
matplot(wavelengths_C,t(CalA1A3),lty=1,type="l",
+ pch=NULL,xlab="nm",ylab="abs",col="red",main="A1 - A3")

CalA2A3<-CalSetA2_tC_spec_msc - CalSetA3_tC_spec_msc
matplot(wavelengths_C,t(CalA2A3),lty=1,type="l",
+
pch=NULL,xlab="nm",ylab="abs",col="red",main="A2 - A3")