{'fraction_non_alphanumeric': 0.011514614703277236, 'fraction_numerical': 0.00354295837023915, 'mean_word_length': 5.647058823529412, '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}}
An Algorithm for the Hierarchical Organization of Path Diagrams and Calculation of Components of Expected Covariance

Modern structural equation modeling (SEM) software programs include user interfaces for the entry of graphical diagrams as a method for the production of the underlying matrixes that are then manipulated in traditional ways to provide parameter estimates and fit statistics. This work presents an algorithm for the solution of the problem in the reverse order: automatically producing a graphical diagram from a matrix formula in such a way that its components are logically and hierarchically arranged. In the process, the individual path components of expected covariance between variables are calculated and feedback loops or so-called nonrecursive paths are recognized and tagged. Possible uses for this algorithm include automatic recognition of regions of structural underidentification in a model and the didactic graphical display of the components of expected covariance between variables. This algorithm relies on the matrix equations of McArdle and McDonald (1984), a general purpose SEM formulation.