# Improving script_002: “Monitor”

[This article was first published on

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

**NIR-Quimiometría**, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I read in an article that Ian Cowe said that what normally chemometricians do is to look to the graphics, of course interpret those graphics. So I still go on trying to develop a function can help me to understand the graphics and all the statistics there are behind.

I add some more lines to the monitor function:

plot(x~y,main=”X-Y plot”,xlab=”predicted”,ylab=”reference”)

abline(0,1,col=”blue”)

abline(intercept,slope,col=”red”)

abline(intercept+(2.5*sep),slope,col=”red”,lty=4)

abline(intercept-(2.5*sep),slope,col=”red”,lty=4)

I can do the same for the residual plot.

There are two warning lines which advice if the residual exceeds 2,5*SEP value. That is the T value warning limit.

Another line can be add, called the T value action limit (3*SEP).

Graphics show the 0-1 abline (blue) and the calculated slope-intercept abline (red). Limits are with dashed red lines.

To

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

**daily e-mail updates**about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.