{'fraction_non_alphanumeric': 0.02973977695167286, 'fraction_numerical': 0.0018587360594795538, 'mean_word_length': 5.261627906976744, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
blcfa: An R Package for Bayesian Model Modification in Confirmatory Factor Analysis

ABSTRACT In confirmatory factor analysis (CFA), post hoc model modification (PMM) indexes are often used to adjust for possible residual correlations between items. Although the approach is useful for improving model goodness-of-fit, it requires an iterative, one-item-pair-at-a-time procedure that can be tedious and prone to error. This paper provides a didactic discussion in the form of a tutorial of a more efficient and practical alternative and its implementation using an R-based package. The tutorial contains (1) the Bayesian covariance Lasso (least absolute shrinkage and selection operator) approach as an alternative to the PMM method, and (2) the R package blcfa, which implements the Bayesian covariance lasso and directly interfaces with Mplus. It adopts a two-step approach by first estimating the entire residual covariance matrix, and then identifying the nonzero entries and seamlessly feeding them into Mplus. Two examples were used to illustrate package implementation.