*This practical work is based on an initial document written by Boris Hejblum*

Load the `mixOmics`

package and `liver.toxicity`

data:

```
library(mixOmics)
data("liver.toxicity")
```

As before, we want to predict the albumine level using gene expression data.

A first PLS model

Consult the`pls()`

help page, and fit a PLS regression model, first using \(r=10\) (10 latent variables).Number of latent variables

How many latent variables do we have to keep ?

*[Use the*`perf()`

function]PLS regression characteristics

Fit the PLS regression model with the previously chosen number of latent variables.

What are the explained variance proportions (see the results of the`summary()`

function on the PLS object).Individuals representation

Plot the projection of indivuals on the first two latent variables of \(X\) (see`plotIndiv()`

function), and add the measurement time and the paracetamol dose (see`liver.toxicity$treatment`

object). Comment.Variables representation

Plot the links between \(X\) variables and the \(Y\) variable (see the`plotVar()`

) function. Comment.Predictions

Predict the learning set observations and compute the empirical error of the PLS predictor. Comment.