Learn R Programming

psy (version 1.2)

scree.plot: Screeplot of eigenvalues, simulated data are available

Description

Graphical representation of the eigenvalues of a correlation/covariance matrix. Usefull to determine the dimensional structure of a set of variables. Simulation are proposed to help the interpretation.

Usage

scree.plot(namefile, title = "Scree Plot", type = "R", use = "complete.obs", simu = "F")

Arguments

namefile

dataset

title

Title

type

type="R" to obtain the eigenvalues of the correlation matrix of dataset, type="V" for the covariance matrix, type="M" if the input data is directly the matrix, type="E" if the input data are directly the eigenvalues

use

omit missing values by default, use="P" to analyse the pairwise correlation/covariance matrix

simu

simu=p to add p screeplots of simulated random normal data (same number of patients and variables as in the original data set, same pattern of missing data if use="P")

Value

a plot

Details

Simulations lead sometimes to underestimate the actual number of dimensions (as opposed to Kayser rule: eigen values superior to 1). Basically, simu=20 is enough.

References

Horn, JL (1965) A Rationale and Test for the Number of Factors in Factor Analysis, Psychometrika, 30, 179-185. Cattell, RB (1966) The scree test for the number of factors. Multivariate Behavioral Research, 1, 245-276.

Examples

Run this code
# NOT RUN {
data(expsy)
scree.plot(expsy[,1:10],simu=20,use="P") #no obvious structure with such a small sample
# }

Run the code above in your browser using DataLab