(This article was first published on

**NIR-Quimiometría**, and kindly contributed to R-bloggers)I add a new video

**“Should I adjust the slope**”, where a new part of script is added to the monitor function. I don´t recommend adjusting the slope, but there are circumstances where it is necessary:Suppose you have an equation, but not the calibration set from which it was developed, in that case is necessary to adjust the slope and the intercept in some cases, in others just the bias

*(See the video*We have to take into account that the calibration was developed with the samples scanned in another instrument and with (probably) another reference method, so adjust the slope and intercept is a way to standardize one instrument to the other or one reference method to the other.**“Should I adjust the Bias”**).To adjust the Bias and the Slope/Intercept, we should have a representative set with samples including all the variance represented in the calibration set. If not any of these adjustments should be done.

If we run the monitor and observe a slope problem in the slope/intercept or bias we have to check the instrument for problems and the reference method as well.

We have to see all the statistics together in order to find an answer.

To see if an adjustment of the slope is necessary, we have to see (with a T-test) if there are significant references that the calculated slope is different from 1.

We have to calculate the residual standard deviation:

, but the predicted values (y hat) are changed by the predicted value corrected with the slope and intercept.

ISO 12099 describes how to get a “

**t observed”**from this RSD, and we compare it with the value obtained from tables for a probability of**α =0.05**.I have added these calculations to R script.

These monitor function can be configures the way we prefer. You can take ideas from the ISO12099, or from an interesting article you can download from the Web:

See post: "Some considerations about NIR Spectroscopy"

See post: "Some considerations about NIR Spectroscopy"

To

**leave a comment**for the author, please follow the link and comment on his blog:**NIR-Quimiometría**.R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...