Description Usage Arguments Details Value Author(s) Examples
The function provides a data pretreatment approach called Pareto Scaling. Each column of the table is given a mean of zero by substracting the column column mean from each value in the column; then each value in each column is divided by a scaling factor, represented by the square root of the standard deviation of the column values.
1 | paretoscale(data, exclude = T)
|
data |
a n x p matrix of n observations and p predictors. If the first two columns of the matrix represent respectively the sample names and the class labels associated to each sample, the scaling method should not include these two columns |
exclude |
a boolean variable. If set to True the scaling method will exclude the first two columns. |
This function is useful when variables have significantly different scales. It is generally the preferred option in NMR Metabolomics because it is a good compromise between no scaling (centering) and auto scaling
a scaled version of the input matrix
Piegiorgio Palla
1 2 3 4 5 | #' ## load the included example dataset
data(cachexiaData)
## call paretoscale with the parameter exclude set to TRUE (default)
## in order to exclude the first two columns of the dataset from scaling
data.scaled <- paretoscale(cachexiaData, exclude = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.