Calculating distance to the model in X space

dmodx(mod, plot = TRUE)

Arguments

mod

OPLS model of type OPLS_metabom8.

plot

Logical indicating if results should be visualised.

Value

The projection distance of each observation in the model (DModX).

NA

References

Bylesjö M., et al. (2002) OPLS discriminant analysis: combining the strengths of PLS-DA and SIMCA classification. Journal of Chemometrics, 20, 341-51.

Wold S. (1976) Pattern recognition by means of disjoint principal components models. Pattern Recognition, 8, 127-39.

See also

Author

torben.kimhofer@murdoch.edu.au

Examples

data(covid) model=opls(X, Y=an$type)
#> Performing discriminant analysis.
#> Error in .checkDimXY(X, y_check[[1]]): Error: Dimensions of input X and Y do not match.
dmx=dmodx(model)
#> Error in dmodx(model): object 'model' not found