scree_plot: Scree Test

View source: R/scree_plot.R

scree_plotR Documentation

Scree Test

Description

scree_plot generates a scree plot with superimpose parallel analysis

Usage

scree_plot(data, n.iter = 50, method = c("pc", "pa", "ml"), ...)

Arguments

data

a data frame or correlation matrix.

n.iter

number of iterations for parallel analysis.

method

factoring method (pc, pa, or ml).

...

parameters passed to psych::fa.parallel.

Details

The scree_plot function is a wrapper for the psych::parallel function. A ggplot2 graph is produced with the scree plot and parallel analysis (scree plot for simulated data) based on the method chosen. The methods are principal components ("pc"), principal axis ("pa"), and maximum likelihood ("ml") factoring.

Value

a ggplot2 graph

Examples

scree_plot(Harman74.cor$cov, method="pc", n.obs=145)

Rkabacoff/qacDR documentation built on March 17, 2022, 5:15 p.m.