ScreePlot: 'ScreePlot'

View source: R/principalcomponentsanalysis.R

ScreePlotR Documentation

ScreePlot

Description

Plot the eigenvalues from an existing principal component or factor analysis or plot the eigenvalues from the correlation or covariance matrix of a data frame.

Usage

ScreePlot(
  x,
  weights = NULL,
  subset = NULL,
  missing = "Exclude cases with missing data",
  use.correlation = TRUE,
  trim.padding = FALSE
)

Arguments

x

Either a data frame, a numeric vector of eigenvalues, or the eigenvalues from an analysis of class flipFactorAnalysis from PrincipalComponentsAnalysis, or fa or principal from package psych. When x is a data frame, additional arguments can be supplied as to how to compute the covariance or correlation matrix.

weights

A numeric vector containing the weight for each case in data.

subset

A logical vector which describes the subset of data to be analyzed.

missing

A string specifiying what to do when the data contains missing values. The valid options are "Error if missing data", "Exclude cases with missing data", "Use partial data (pairwise correlations)", and "Imputation (replace missing values with estimates)".

use.correlation

A logical value specifying whether to use the correlation matrix (TRUE), or the covariance matrix (FALSE).

trim.padding

Logical; whether to remove extra padding around the htmlwidget. By default this is set to FALSE to be the same as old charts

Value

An HTML widget object from plotly containing the Scree Plot.


NumbersInternational/flipDimensionReduction documentation built on Aug. 20, 2024, 2:32 a.m.