Skip to contents

Applies a chosen rotation (e.g., "varimax") to each cluster's loading matrix (Lambda[[k]]). Optionally, also rotates the factor scores in factor_scores[[i]] if they exist and rotate_scores=TRUE.

Usage

rotate_mfa_model(
  mfa_fit,
  rotation = c("varimax"),
  rotate_scores = FALSE,
  cluster_ids = NULL
)

Arguments

mfa_fit

A fitted MFA model, typically returned by mfa_em_fit() or select_optimal_K_r_mfa()$best_model_info$model, containing:

  • Lambda[[k]]: (M x r) factor loadings for each cluster.

  • factor_scores[[i]]: optional (T_i x r) factor scores for subject i.

  • z[i]: cluster assignments.

rotation

A string specifying the rotation method. Currently supports "varimax".

rotate_scores

Logical; if TRUE and factor_scores exist, rotate them as well. If factor_scores do not exist and rotate_scores=TRUE, an error or warning is produced.

cluster_ids

Vector of cluster indices to rotate. Defaults to all.

Value

A new MFA model object, with rotated Lambda (and factor_scores if requested). Other fields are unchanged.

Details

- Rotation does not change log-likelihood or BIC, just reorients factors for interpretability. - If factor_scores is missing and rotate_scores=TRUE, you can either skip or error.