Publications by jrcuesta

PCA file calculation with "R".

05.12.2011

X es la matriz centrada (X is the centered matrix). Xcov es la matriz de covarianzas de X (Xcov is the covariance matrix of X).Con la función “eigen” calculamos los “eigenvectors” y “eigenvalues” de Xcov.(With the function “eigen” we calculate the “eigenvectors” and “eigenvalues” of  Xcov).Para hacer todo al mismo tiempo...

1183 sym 4 img

Principal Components Analysis with "R" (Part: 001)

07.12.2011

This is the first “post” of my new adventure with a software that I consider very interesting and that give to people the oportunity to work with Chemometrics (“R” is free).To follow these examples, yo can download the following article:“Multivariate Statistical Analysis using the R package chemometrics“Decidimos seleccion...

891 sym 6 img

Pairs for the "P" (loadings) matrix

12.12.2011

Ver primero: PCA file calculation with “R”See first:         PCA file calculation with “R”Podemos ver los diferentes planos que forman los PCs entre sí, con la función “Pairs” de “R”.We can see all the combinations of planes (which form the Principal Components) with the function  “Pairs” (R). Related To leave a ...

693 sym 6 img

IRIS Flower Data Set (R-001)

17.12.2011

IRIS Flower Data SetEste es el Link a Wikipedia donde podéis encontrar los datos que utilizó Fisher en su trabajo de 1936. Ya hemos trabajado con estos datos en Excel y los continuaremos usando en nuevas entradas.En este link, podemos ver las fotos de las flores (IRIS en castellano son lírios).Represento como LS (longitud del sépalo), AS (anc...

1401 sym 10 img

IRIS Flower Data Set (R-002)

17.12.2011

Ver  primero: IRIS Flower Data Set (R-001)See first:        IRIS Flower Data Set (R-001)El comando “summary” nos ayuda a comprender la importancia de cada componente principal:Los “eigenvalues” son las desviaciones estándar al cuadrado:Para comprobar la importancia de los eigenvalues, podemos verlos en forma de gráfico:> lambda...

820 sym 10 img

IRIS Flower Data Set (R-003)

19.12.2011

Centramos la matriz con el comando, generando a partir de A una nueva matriz que llamamos “Acentered”Acentered=scale(A,center=T)Ahora con la función “eigen”:Esta es otra forma de proceder con el cálculo de los componentes principales (eigenvectors y eigenvalues), como ya vimos en un post anterior. Related To leave a commen...

709 sym 4 img

NIPALS: Principal Components Analysis with "R" (Part: 002)

01.01.2012

We started some posts based on the tutorials of:“Multivariate Statistical Analysis using the R package chemometrics“The first post was:Principal Components Analysis with “R” (Part: 001)Now we continue with a second part.The graphics help us to decide the number of PCs, but for the tutorial we decided 5 PCs.So, let´s calculate the PC spa...

2587 sym 6 img

"R": Looking at the Data (Gasoline) – 001

01.02.2012

As other softwares “R” has nice tools to look to the data before to develop the calibration.Statistics for the “Y” variable (in this case octane number) like Maximun, Minimun,..,standard deviation,…are important:> library(ChemometricsWithR)> data(gasoline)> summary(gasoline$octane)   Min.  1st Qu.  Median    Mean   ...

1004 sym 4 img

"R": Plotting the spectra (Gasoline) – 002

02.02.2012

“R” has a package called “ChemometricsWithR”, where we can get data from different analytical instruments including Near Infrared (NIR).Follow the steps to plot the spectra of a gasoline data set:In this other case we plot the spectra of the NIR shootout 2002: > data(shootout)> wavelengths> mattplot(wavelengths,shootout$calibr...

946 sym 6 img

"R": PLS Regression (Gasoline) – 003

03.02.2012

The gasoline data set has the spectra of 60 samples acquired by diffuse reflectance from 900 to 1700 nm. We saw how to plot the spectra in the previous post.Now, following the tutorial of Bjorn-Helge Mevik published in “R-News Volume 6/3, August 2006”, we will do the PLS regression:gas1 This will fit a model of 10 components.We will use the �...

2263 sym 6 img