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.
| Parameter | Description |
|---|---|
| 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. |
Creates a sample dataset 'analysisData' in the 'mycas' library with simulated numeric variables.
| 1 | cas; |
| 2 | LIBNAME mycas cas; |
| 3 | |
| 4 | DATA mycas.analysisData; |
| 5 | array x{10}; |
| 6 | DO i=1 to 1000; |
| 7 | DO j=1 to 10; |
| 8 | x{j} = rannor(123) + (i/1000); |
| 9 | END; |
| 10 | OUTPUT; |
| 11 | END; |
| 12 | |
| 13 | RUN; |
| 14 |
Determines the number of factors using the default settings based on the input variables x1 through x10.
| 1 | |
| 2 | PROC CAS; |
| 3 | factorAnalysis.faNFactors TABLE={name="analysisData"} inputs={"x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10"}; |
| 4 | |
| 5 | RUN; |
| 6 |
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.
| 1 | |
| 2 | PROC CAS; |
| 3 | factorAnalysis.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 | |
| 5 | RUN; |
| 6 |