22 ene 2018

Analyzing Soy meal in transmitance (Part 4)

This is the fourth of the posts about analyzing soy meal unground in an Infratec, adding the sample directly to the conveyor in the same way that we do with wheat or barley. The range wavelength in the Infratec is from 850 to 1050nm, in steps of 2 nm, so we have a total of 100 data points.

 
I am use to look for outliers using the Mahalanobis distance (MD), which is based in the scores values for the samples in the Principal Component Space.
There are several packages in R, to see the value of the MD, and one of them is the package "Chemometrics", so we load this package and run sam script wit the values we have get from the previous  post.
We can fit to ablines to configure the MD, one for Warning with a vaue of 3.00 and another for the Action with a value of 4.00. The line for warning is orange and for action is orange.
 
library(chemometrics)
X_msc_pca<-princomp(X_msc,cor=TRUE)
res<-pcaDiagplot(X_msc,X_msc_pca,a=2)
plot(res$SDist,ylim=c(0,8),ylab="score distance",
     xlab="sample number")
identify(res$SDist)
abline(h=4,col="red")
abline(h=3,col="orange")
 
and we get this plots, where we can see how samples 298 and 373 appear as outliers, specially for their high scores values in the PC number 2 as we have seen in the previous posts.
 

No hay comentarios:

Publicar un comentario