calculation of 3 parameters: T2-Hotelling, Q or residual variances, and leverage, useful to identify outliers
[t2,q,leverage] = outlier(x,x_scores,x_loadings,lv)
x is a Div structure or a matrix of dimensions (n x q)
the scores obtained after a PCA onto x
x_scores is a Div structure or a matrix of dimensions (n x naxes)
the loadings obtained after a PCA onto x
x_loadings is a Div structure or a matrix of dimensions (n x naxes)
the maximum number of eigenvectors or latent variables to be computed
lv must be lower or equal to naxes
Hotelling's T2; a Div structure
T2.d is of dimensions (n x lv)
the residual variances; a Div structure
q.d is of dimensions (n x lv)
the leverage effect; a Div structure
leverage.d is of dimensions (n x lv)