Skip to contents

After calling select_optimal_K_r_mfa (or a similar function), you have $all_models containing fits for various (K, r). This function extracts the model for a user-specified pair (K_target, r_target).

Usage

get_model_by_K_r(selection_obj, K_target, r_target)

Arguments

selection_obj

The object returned by select_optimal_K_r_mfa.

K_target

Desired number of clusters.

r_target

Desired factor dimension.

Value

The fitted model (the same structure returned by mfa_em_fit), or NULL if no match found.

Examples

if (FALSE) { # \dontrun{
sel_obj <- select_optimal_K_r_mfa(my_data, Kvec=2:4, rvec=1:3)
best_model <- get_model_by_K_r(sel_obj, K_target=3, r_target=2)
} # }