View source: R/utility_functions.R
extract_s | R Documentation |
Given two vectors of loadings, computes the Cattell's S-statistic between them with a specified cut off.
extract_s(vector1, vector2, cut_off = 0.1)
vector1 |
First numerical vector of loadings for the calculation. |
vector2 |
Second numerical vector of loadings for the calculation. |
cut_off |
Numerical value for the loading cut off to determine if a variable is silent or not in Cattell's terms. Default = 0.1 |
The s index was first suggested by Cattell et al. It is based on the factor mandate matrix (see ref) where loadings are either 1 if a component is considered to act on a variable, called a salient variable, or 0 if not (forming the hyperplane space). Cattell’s suggested an arbitrary ±0.1 cut-off to be considered as salient variables. In practice, one might want to alter the threshold depending on the experimental conditions.
Returns the Cattell's S-statistic between vector1 and vector2 at cut_off.
Abel Torres Espin
Cattell RB, Balcar KR, Horn JL, Nesselroade JR. Factor Matching Procedures: an Improvement of the s Index; with Tables. Educ Psychol Meas. 1969 Dec;29(4):781–92
#'data(mtcars) pca_mtcars_1<-prcomp(mtcars, center = TRUE, scale = TRUE) #Second pca with a subsetted mtcars as an example of comparing loading patterns #from two proximal datasets pca_mtcars_2<-prcomp(mtcars[1:20,], center = TRUE, scale = TRUE) s.loadings_1<-stand_loadings(pca = pca_mtcars_1, pca_data = mtcars) s.loadings_2<-stand_loadings(pca = pca_mtcars_2, pca_data = mtcars[1:20,]) extract_s(s.loadings_1[,1], s.loadings_2[,1], cut_off=0.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.