Conducts a parallel analysis to determine how many factors to retain in a factor analysis.
parallel_analysis(
data = NULL,
names_of_vars = NULL,
iterations = NULL,
percentile_for_eigenvalue = 95,
line_types = c("dashed", "solid"),
colors = c("red", "blue"),
eigenvalue_random_label_x_pos = NULL,
eigenvalue_random_label_y_pos = NULL,
unadj_eigenvalue_label_x_pos = NULL,
unadj_eigenvalue_label_y_pos = NULL,
label_offset_percent = 2,
label_size = 6,
dot_size = 5,
line_thickness = 1.5,
y_axis_title_vjust = 0.8,
title_text_size = 26,
axis_text_size = 22
)
a data object (a data frame or a data.table)
names of the variables
number of random data sets. If no input is entered, this value will be set as 30 * number of variables.
percentile used in estimating bias (default = 95).
types of the lines connecting eigenvalues.
By default, line_types = c("dashed", "solid")
size of the dots denoting eigenvalues (default = 5).
(optional) x coordinate of the label for eigenvalues from randomly generated data.
(optional) y coordinate of the label for eigenvalues from randomly generated data.
(optional) x coordinate of the label for unadjusted eigenvalues
(optional) y coordinate of the label for unadjusted eigenvalues
How much should labels for the eigenvalue curves be offset, as a percentage of the plot's x and y range? (default = 2)
size of the labels for the eigenvalue curves (default = 6).
size of the dots denoting eigenvalues (default = 5).
thickness of the eigenvalue curves (default = 1.5).
position of the y axis title as a proportion of the range (default = 0.8).
size of the plot title (default = 26).
size of the text on the axes (default = 22).
The following package(s) must be installed prior to running the function: Package 'paran' v1.5.2 (or possibly a higher version) by Alexis Dinno (2018), https://cran.r-project.org/package=paran
# \donttest{
parallel_analysis(
data = mtcars, names_of_vars = c("disp", "hp", "drat"))
# parallel_analysis(
# data = mtcars, names_of_vars = c("carb", "vs", "gear", "am"))
# }
Run the code above in your browser using DataLab