Blog Archives

VIDEO: Applying "MSC" math-treatment to our raw spectra in "R".

March 25, 2012
By
VIDEO: Applying "MSC" math-treatment to our raw spectra in "R".

(This article was first published on NIR-Quimiometría, and kindly contributed to R-bloggers) 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...

Read more »

VIDEO:Looking to "NIR" Spectra in "R": (Import and organize)

March 24, 2012
By
VIDEO:Looking to "NIR" Spectra in "R":  (Import and organize)

 

Read more »

Applying Savitzky-Golay filters in “R”

March 20, 2012
By
Applying Savitzky-Golay filters in “R”

(This article was first published on NIR-Quimiometría, and kindly contributed to R-bloggers) When applying SG, we select a moving average window with an odd value “n” for the number of data points. SG fit a polynomial of “p” degree to this data points and give the value to the central point (this is the reason to have an odd...

Read more »

Savitzky-Golay filters in R

March 17, 2012
By
Savitzky-Golay filters in R

Derivatives are a good way to extract information to our spectra. As we know NIR contents overlapping bands, and spectra must be treated with math operations in order to extract as much information as possible and to correlate it with the constituent &...

Read more »

NIT: Fatty acids study in R – Part 007

March 14, 2012
By
NIT: Fatty acids study in R – Part 007

Once we have chosen the model, we can continue acquiring spectra of new samples. Spectra is exported to a txt or csv file and we imported in R to be reprocessed.We use the function “predict” from the PLS package. I have done this with 20 new sample...

Read more »

NIT: Fatty acids study in R – Part 006

March 12, 2012
By
NIT: Fatty acids study in R – Part 006

In one of the columns, for constituent C16_0, one sample (57) has a value of “zero” (we could see this in the histogram).The reason for that is that the laboratory did not supply this value. The PLS regression will consider the lab value as cero, s...

Read more »

NIT: Fatty acids study in R – Part 005

March 9, 2012
By
NIT: Fatty acids study in R – Part 005

There are several algorithms to run a PLS regression (I recommend to consult the books: “Introduction to Multivariate Analysis in Chemometrics - Kurt Varmuza & Peter Filzmozer” and “Chemometrics with R – Ron Wehrens”).We are going to use ...

Read more »

NIT: Fatty acids study in R – Part 004

March 7, 2012
By
NIT: Fatty acids study in R – Part 004

It is clear that MSC does not remove the entire scatter in the raw spectra, so some of the information is hidden by the scatter. Improvement of the sample presentation will help to remove the scatter.We know that the first loading is much related to th...

Read more »

NIT: Fatty acids study in R – Part 003

March 5, 2012
By
NIT: Fatty acids study in R – Part 003

As I told you I´m a beginner in "R", so I realize that I have to prepare my data a little bit in order to continue from my previous post ( NIT: Fatty acids study in R - Part 002) after getting some errors. Anyway I´m really fascinated ...

Read more »

NIT: Fatty acids study in R – Part 002

March 2, 2012
By
NIT: Fatty acids study in R – Part 002

> library(chemometrics)> fatmsc_nipals<-nipals(fat_msc,a=10,it=160)> CPs<-seq(1,10,by=1)> matplot(CPs,t(fatmsc_nipals$T),lty=1,pch=21,  + xlab="PC_number",ylab="Explained_Var")In the 2D plot, we can see that with 3 or 4 principal...

Read more »