Monitor: Using category labels

[This article was first published on 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´ve been checking recently the performance of a calibration of compound feed with  a set of samples (15): 3 samples of hen feed, 3 of pig feed, 3 of chicken feed, 3 of ovine feed and 3 of cattle feed.
The idea is to check if the calibration predicts correctly the results, but in this post I will visualize the plots in order to get conclusions.
Sample set has been imported into R with a column called “Category” (with the labels of feed types: hen, pig,).
I will check just the protein X-Y plots:

plot(comp.feed$prot_A,comp.feed$prot_B,pch=c(1:5)[comp.feed$Category])
legend(“bottomright”,levels(comp.feed$Category),pch=c(1:5))
abline(0,1)

 

I will not go into details of the statistics this time, just interpretation.
Chicken seems quite well predicted and the 3 samples fits fine into the 0 intercept, 1 slope line. Same for pig feed.
Sheep feed is a little bit worse but could be fine.
I have problems with hen feed (high residuals and low variability in the test set).
For cattle feed I have a bias problem (one of the methods is predicting higher than the other), we need to check with more samples to confirm this tendency.
Comments are welcome about how to improve this plot with colors for the categories.

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.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)