factorAnalysis

faNFactors

Description

The faNFactors action determines the number of factors to be retained in a factor analysis. It allows you to specify various criteria such as minimum eigenvalue, proportion of variance explained, minimum average partial correlation (MAP), and parallel analysis. The action can combine these criteria using summary statistics like MIN, MAX, MEAN, or MEDIAN to suggest a final number of factors.

Settings
ParameterDescription
attributes Changes the attributes of variables used in this action (e.g., formats, labels).
corrOut Specifies an output table to contain the correlation matrix, summary statistics, and number of observations.
criteria Specifies one or more criteria (EIGENVALUE, MAP2, MAP4, PARALLEL, PROPORTION) to determine the number of factors.
display Specifies a list of results tables to send to the client for display.
freq Specifies a numeric variable that contains the frequency of occurrence of each observation.
inputs Specifies the input variables to use for the analysis.
nFactors Specifies how to combine multiple criteria to determine the final number of factors (MIN, MAX, MEAN, MEDIAN).
outputTables Lists the names of results tables to save as CAS tables on the server.
priors Specifies the method of computing prior communality estimates (e.g., SMC, MAX, ONE, RANDOM).
table Specifies the settings for the input table.
varianceDivisor Specifies the divisor used for calculating variances and covariances (DF, N, WDF, WEIGHT).
weight Specifies a numeric variable to use as a weight to perform a weighted analysis.
Data Preparation View data prep sheet
Create Data for Factor Analysis

Creates a sample dataset 'analysisData' in the 'mycas' library with simulated numeric variables.

Copied!
1cas;
2LIBNAME mycas cas;
3 
4DATA mycas.analysisData;
5array x{10};
6DO i=1 to 1000;
7DO j=1 to 10;
8x{j} = rannor(123) + (i/1000);
9END;
10OUTPUT;
11END;
12 
13RUN;
14 

Examples

Determines the number of factors using the default settings based on the input variables x1 through x10.

SAS® / CAS Code Code awaiting community validation
Copied!
1 
2PROC CAS;
3factorAnalysis.faNFactors TABLE={name="analysisData"} inputs={"x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10"};
4 
5RUN;
6 
Result :
A table displaying the suggested number of factors based on default criteria.

Uses Eigenvalue and Proportion criteria, setting the final factor count to the minimum suggested by active criteria, and specifies Squared Multiple Correlations (SMC) for priors.

SAS® / CAS Code Code awaiting community validation
Copied!
1 
2PROC CAS;
3factorAnalysis.faNFactors TABLE={name="analysisData"} inputs={"x1", "x2", "x3", "x4", "x5"} criteria={{type="EIGENVALUE", threshold=1.0}, {type="PROPORTION", threshold=0.75}} nFactors="MIN" priors={type="SMC"};
4 
5RUN;
6 
Result :
Detailed tables showing the number of factors suggested by each criterion and the final determined number of factors.

FAQ

What is the purpose of the faNFactors action?
What criteria can be used to determine the number of factors?
How does the action decide the final number of factors if multiple criteria are active?
How can I customize the parallel analysis simulation?
Can I provide my own prior communality estimates?
What does the "threshold" parameter do in the criteria configuration?
How can I perform a weighted analysis?