28 ene. 2018

Analyzing Soy meal in transmittance (part 8)

Continuing from the post "Analyzing Soy meal in transmittance (part 7)", we are going to remove the four samples which are out of the action limit (residual higher than 3.RMSEP) , and to recalculate the model.
soy_ift_prot1r1<-soy_ift_prot1[-c(183,107,108,267),]
Prot_plsr_r1<- plsr(soy_ift_prot1r1$Prot~soy_ift_prot1r1$X_msc,

                    ncomp = 16,data =soy_ift_prot1,
                    validation = "LOO")
summary(Prot_plsr_r1)
predictions<-(Prot_plsr_r1$fitted.values[,,9])
soy_ift_prot2r1<-cbind(soy_ift_prot1r1$Sample,

                       soy_ift_prot1r1$Prot,
                       predictions)
monitor_prot_r1<-monitor10c24xyplot(soy_ift_prot2r1)

With this code we get the new X-Y plot and the new statistics, and finally we are going to keep this model.


I don´t consider necessary to remove more samples, and the Monitor function give us the distribution of the residuals into the different regions:

 

  Residuals into 68% prob (+/- 1SEP) = 459 % = 70.72419 Residuals into 95% prob (+/- 2SEP) = 611 % = 94.14484 Residuals into 99.5% prob (+/- 3SEP) = 646 % = 99.53775 Residuals outside 99.5% prob (+/- 3SEP) = 3    % = 0.4622496
 
As we can see we get a Gaussian distribution for the residuals.
 

This calibration was done with data from an IFT1241.There is a new instrument called Infratec NOVA, and an exercise has been done in order to check if the calibration developed in an Infratec 1241 can be used in routine in an Infratec NOVA. With this purpose a set of external validation samples had been analyzed in an Infratec NOVA using the same transmittance path length than in the Infratec.

Once the samples had ben analyzed the spectra has been exported and as reference values we add the predicted values obtained in NIR reflectance instruments calibrated with values for the official reference methods.
 
We will use this data to check the model or adjust it if necessary. We can validate using different number of terms to see if the model is overfitted for this external data set, and we will se that this is the case and that the best  results are for 4 terms, but there is a bias due probably to dome differences in the instruments itself.
With 4 terms the validation (with the Monitor function) is:

 
We see the actual values in red, and that a Bias adjustment is recommended, so with the bias adjustment we would see the yellow dots.
As we can see we have a bias, but the error with the Bias corrected is quite good (SEP=0,529).
If we add more terms the statistics are not so good like this, so maybe the best option is to add this samples to the data base and recalibrate to add the new variability to the model.

No hay comentarios:

Publicar un comentario