Publications by jrcuesta

Sorting the "Sample Sets" by constituents

08.04.2012

I use to see the videos from:http://www.twotorials.com/and the video:How to order and sort stuff in Ris really useful to apply this concept to organize and understand better our sample sets before to proceed to develop a calibration.The idea of this post is after watching the video to create a new dataframe sorted by the “Moisture” constituen...

4403 sym 2 img

Looking to the difference spectrum

09.04.2012

From the previous post, we can make the difference spectrum (once the samples are sorted by moisture) between the sample with the lowest moisture value (position 1), from the sample with the highest moisture value (position 66). This spectra will help us to understand where are the band positions (should be positive) for the moisture. Of course o...

1458 sym 4 img

Correlation Matrix (Constituents)

09.04.2012

It is important to understand as better as possible our sample set before to develop the regression. Continuing with the “Y” matrix (constituent’s matrix) we have to observe the correlation matrix.In the R Graph Gallery, we can get the code to draw a nice Correlation Matrix Plot, with the X-Y plots and the Pearson correlation values, apart ...

1520 sym 4 img

CORRGRAM: Correlation Matrix (Constituents)

12.04.2012

Thanks a lot to Kevin W., for his comment in my previous post.Corrgram, it a nice package and I found very nice information to understand it a little bit better on Internet apart from the R help page.Corrgrams: Exploratory displays for correlation matriceshttp://www.statmethods.net/advgraphs/correlograms.htmlhttp://cran.r-project.org/...

1004 sym 4 img

CORRGRAM: Correlation Matrix (Wavelengths)

13.04.2012

With the “Corrgram” package we can see patterns that can help us to recognize possible inter-correlations in a big matrix. This could be the case to see the correlation to every wavelength respect to all others. This way we can see the high correlation respect to their neighbors and between the different overtones.  I have selected just 40 (...

797 sym 4 img

Math Spectra Patterns

16.04.2012

I was working today with “R” to get more patterns with the Corrgram. In the demo raw spectra I wanted this time to look to a band as much Gaussian as possible. I select it and trim the spectra to that region treated with the MSC (“Multiple Scatter Correction”).After I decided to apply another Math treatment (SG filter 2ª deri...

968 sym 8 img

More Spectra patterns (1ª derivative)

17.04.2012

In the case of the first derivative for the absortion band, the maximum becomes a cero crossing.Using SG filters, we can calculate it with R, and to see, like in the last posts, the Corrgram matrix.Corrgram for the first derivative for this band:Let´s see the three corrgram patterns together: (MSC, 1ª derivative, 2ª derivative) R...

740 sym 12 img

"Correlation / Covariance" Spectrum (This time with "R")

18.04.2012

I treat this matter with other software´s, and of course you can do the same with “R”.Once I have the spectra of my samples with a math treatment, I want to draw a correlation spectrum to see which wavelengths have better correlation with the constituent of interest.In this example I want to see the correlation of the wavelengths treated wi...

1527 sym 6 img

R^2 Spectrum

21.04.2012

We have seen in the previous post, how to calculate the correlation spectrum, but other simple way to show  how the bands correlate to the constituent of interest is to calculate R^2. This way we remove the negative part of the correlation spectrum.XmscYmoicor_specrsq_speccov_specmatplot(wave_nir,t(cor_spec),lty=1,pch=”*”,xlab=”nm”,ylab=...

996 sym 4 img

Monitoring some statistics with "R"

01.05.2012

I´ve been practicing after reading a couple of tutorials:R: A self-learn tutorialProgramming in Rto create a basic function  to monitor some  basic statistics as RMSEP, Bias, SEP, Correlation and RSQ. I´ve been doing this with other software`s, so it´s time for “R”. This is the script, please add feedback to improve it. monitor2   �...

1010 sym 2 img