|
1 | 1 | # ============================================================================= |
2 | | -# Correlation type selection / construction for Factor Analysis (issue #26623) |
| 2 | +# Correlation type selection / construction, shared by Factor Analysis (issue #26623) and |
| 3 | +# PCA (issue #37294). Keep the user-facing strings analysis-neutral -- both render them. |
3 | 4 | # |
4 | 5 | # Automatic selection rules (spec): |
5 | 6 | # |
@@ -323,7 +324,7 @@ select_factor_correlation_type <- function(data, variables = names(data), |
323 | 324 | if (any(detected_types == "nominal")) { |
324 | 325 | nominal_variables <- variable_summary$variable[detected_types == "nominal"] |
325 | 326 | warning_message <- sprintf( |
326 | | - "Nominal categorical variables cannot be used directly in this factor analysis: %s", |
| 327 | + "Nominal categorical variables cannot be used directly in this analysis: %s", |
327 | 328 | paste(nominal_variables, collapse = ", ")) |
328 | 329 | return(build_result("unsupported", "Unsupported", NA_character_, character(), |
329 | 330 | warning_message, c(all_warnings, warning_message))) |
@@ -631,7 +632,7 @@ unavailable_polychoric_diagnostics <- function() { |
631 | 632 | "Categorical variables that have a category holding a very small share of the responses. Correlations estimated from categories may become unstable when categories are sparse.", |
632 | 633 | "Variable pairs that have a category combination with no observations.", |
633 | 634 | "Variable pairs whose correlation could not be estimated.", |
634 | | - "Whether the estimated correlation matrix was positive definite, which factor analysis assumes, before any smoothing.", |
| 635 | + "Whether the estimated correlation matrix was positive definite, which the analysis assumes, before any smoothing.", |
635 | 636 | "Whether the correlation matrix had to be smoothed to become positive definite." |
636 | 637 | ), |
637 | 638 | status = rep("na", 6) |
@@ -785,7 +786,7 @@ compute_polychoric_diagnostics <- function(data, cor_result, selection, |
785 | 786 | "Categorical variables that have a category holding a very small share of the responses. Correlations estimated from categories may become unstable when categories are sparse.", |
786 | 787 | "Variable pairs that have a category combination with no observations.", |
787 | 788 | "Variable pairs whose correlation could not be estimated.", |
788 | | - "Whether the estimated correlation matrix was positive definite, which factor analysis assumes, before any smoothing.", |
| 789 | + "Whether the estimated correlation matrix was positive definite, which the analysis assumes, before any smoothing.", |
789 | 790 | "Whether the correlation matrix had to be smoothed to become positive definite." |
790 | 791 | ), |
791 | 792 | status = c(category_status, sparse_status, empty_status, failure_status, definite_status, smoothed_status) |
|
0 commit comments