plot.KGC: Plot Kaiser-Guttman Criterion (KGC) Plot

View source: R/plot.R

plot.KGCR Documentation

Plot Kaiser-Guttman Criterion (KGC) Plot

Description

This function generates a Kaiser-Guttman Criterion (KGC) plot to visualize the eigenvalues of the actual data. The Kaiser-Guttman Criterion, also known as the Kaiser criterion, suggests retaining factors with eigenvalues greater than 1. The plot shows the eigenvalues and includes a reference line at 1 to indicate the threshold for factor retention.

Usage

## S3 method for class 'KGC'
plot(x, ...)

Arguments

x

An object of class KGC, representing the results to be plotted.

...

Additional arguments to be passed to the plotting function.

Value

None. This function is used for side effects (plotting).

See Also

KGC

Examples

library(EFAfactors)
set.seed(123)

## Take the data.bfi dataset as an example.
data(data.bfi)

response <- as.matrix(data.bfi[, 1:25]) ## Load data
response <- na.omit(response) ## Remove samples with NA/missing values

## Transform the scores of reverse-scored items to normal scoring
response[, c(1, 9, 10, 11, 12, 22, 25)] <- 6 - response[, c(1, 9, 10, 11, 12, 22, 25)] + 1


  KGC.obj <- KGC(response)

  ## Plot the Kaiser-Guttman Criterion
  plot(KGC.obj)



EFAfactors documentation built on Sept. 30, 2024, 1:06 a.m.