extract_s: Extracts Cattell's S-statistic

View source: R/utility_functions.R

extract_sR Documentation

Extracts Cattell's S-statistic

Description

Given two vectors of loadings, computes the Cattell's S-statistic between them with a specified cut off.

Usage

extract_s(vector1, vector2, cut_off = 0.1)

Arguments

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

Details

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.

Value

Returns the Cattell's S-statistic between vector1 and vector2 at cut_off.

Author(s)

Abel Torres Espin

References

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

Examples

#'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)


ucsf-ferguson-lab/syndRomics documentation built on June 26, 2022, 5:36 p.m.