27 nov. 2014

Monitor function 27-11-2014

Once developed a model with the math treatments we consider adequate, and using the Calibration Samples for Instrument 1 (following with the Shootout_2002 tutorial), the idea is to check if that model performs fine with Instrument 2 for exactly the same samples. A bias is expected, because even being the same model of instrument, differences in the hardware components, optics, alignments,…, apart from some others are the cause of this bias.
Some time ago I develop a function to monitor, to plot and obtain the statistics necessaries to take some decisions as if the bias or slope should be adjusted, to check for outliers of high residuals,.....

It is clear that we have 5 outliers of high residuals that the literature about this set considers that must be removed, so the error RMSEP will decrease.
Due to the high RMSEP of the model used for this monitor (RMSEP=4.33 using 4 terms and with all the samples), the bias must be quite high in order to be consider that it should be adjusted. This error is more than 3 times the Lab error.

So the statistics are:

Where 0.95 is the confidence interval and 4.33 the CV error of the model using 4 terms

N Validation Samples  = 155 
N Calibration Samples = 155 
N Calibration Terms   = 4 
RMSEP    : 4.942 
Bias     : -2.509 
SEP      : 4.272 
UECLs    : 4.951 
***SEP is bellow BCLs (O.K)***
Corr     : 0.9811 
RSQ      : 0.9626 
Slope    : 0.9813 
Intercept: 6.122 
RER      : 19.9   Fair 
RPD      : 5.146   Good 
BCL(+/-): 0.6778 
***Bias adjustment in not necessary***
Residual Std Dev is : 4.266 
***Slope adjustment in not necessary***

We can see how the SEP (error corrected by the bias) is similar to the error of 
the model, so a bias adjustment will help to transfer the model from instrument 1
to Instrument 2.
I will remove the 5 samples and come back with the results.

22 nov. 2014

Solution for the Regression Coefficients (MLR)

I have use one of the examples of the book "Chemometrics in Excel" to play with Matrix formulas in Excel and calculate the regression coefficients (b0, b1,...). As the book explains there is a formula in Excel to calculate them with just one function.
Of course, the regressors are finally the same.

You can see how to run this different operations in Excel in my Youtube Channel

12 nov. 2014

Win ISI available for downloading

Win ISI 7 is available for downlading, click this link to go to the download page of winisi.com and insert your ID and password to access to this version.
You will get a ZIP file and in it there is a document with the new features, and bugs solved.
If you are not registered, you can do it in the link as well, presing the link of the page itself which says "click here to register".

You can try this version and if you find a bug let us know, as Oscar did with the option in Monitor: "Compare Spectra and Equations".

10 nov. 2014

Overplotting scores for Calibration, Test & Validation sets


After calculating the PCA for the Shootout Calibra 1 set, I can see the maps of scores for PC1 vs PC2, PC1 vs PC3, PC2 vs PC3,....
But how can I project other sample sets into this PC space?, and in this case  the Shootout Test 1 and Shootout Valida 1.
The idea is to see if the scores for these Test and Valida Set projected into the PCA space of Calibra 1 are into their cloud space, and all the samples are represented, this way we are not extrapolating.