View source: R/biplot.measures.R
biplot.measures | R Documentation |
Calculates a number of quality measures for principal component biplots of grouped data.
biplot.measures(datalist, projectmat, rdim)
datalist |
List of the data for which the biplot is to be constructed, created with a command such as |
projectmat |
Orthogonal projection matrix used in constructing the biplot. |
rdim |
Number of dimensions of the biplot representation. |
For the plain PCA biplot, use the eigenvectors of the pooled data (not centred per group before pooling) as the projection matrix.
Returns a list with the values:
overall.quality |
Overall quality of the biplot display, a scalar value in the[0-1] range. |
within.quality |
Quality of the within-group variation per group, a vector of values in the [0-1] range. |
within.quality.mean |
Mean quality of the within-group variation displayed in the biplot, a scalar value in the [0-1] range. |
between.quality |
Quality of the between-group variation as displayed in the biplot, a scalar value in the [0-1] range. |
adequacies |
Vector containing the adequacies of the variables (values in the [0-1] range). |
adequacies.median |
Median of the variable adequacies. |
axis.predictivities |
Vector containing the axis predictivities (values in the [0-1] range, but see the notes below). |
axis.predictivities.mean |
Mean of the axis predicitivities. |
sample.predictivities |
Vector containing the sample predictivities (values in the [0-1] range). |
sample.predictivities.mean |
Mean of the sample predictivities. |
mspe |
Vector containing the mean standard predictive errors (MSPE) of the variables. |
mspe.mean |
Mean of the MSPE values. |
The median (instead of the mean) adequacy of the variables is calculated, as the mean adequacy of the variables will always be equal to r/p (r = number of dimensions; p = number of variables), and is therefore uninformative as a quality measure.
The axis predictivities of the variables are only valid if the Type B orthogonality condition holds. It is thus a valid measure for the plain PCA biplot, but not for other types of principal component biplots.
Theo Pepler
Pepler, P.T. (2014). The identification and application of common principal components. PhD dissertation in the Department of Statistics and Actuarial Science, Stellenbosch University.
biplot.choice
# The Iris data data(iris) setosa <- iris[1:50, 1:4] versicolor <- iris[51:100, 1:4] virginica <- iris[101:150, 1:4] project.matrix <- eigen(cov(rbind(setosa, versicolor, virginica)))$vectors # For a 2-dimensional biplot biplot.measures(datalist = list(setosa, versicolor, virginica), projectmat = project.matrix, rdim = 2) # For a 3-dimensional biplot biplot.measures(datalist = list(setosa, versicolor, virginica), projectmat = project.matrix, rdim = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.