{'fraction_non_alphanumeric': 0.02723792160437557, 'fraction_numerical': 0.010865998176845944, 'mean_word_length': 5.442565186751233, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Linear discriminant analysis of phenotypic data for classifying autism spectrum disorder by diagnosis and sex

Autism Spectrum Disorder (ASD) is a developmental condition characterized by social and communication differences. Recent research suggests ASD affects 1-in-44 children in the United States. ASD is diagnosed more commonly in males, though it is unclear whether this diagnostic disparity is a result of a biological predisposition or limitations in diagnostic tools, or both. One hypothesis centers on the ‘female protective effect,’ which is the theory that females are biologically more resistant to the autism phenotype than males. In this examination, phenotypic data were acquired and combined from four leading research institutions and subjected to multivariate linear discriminant analysis. A linear discriminant model was trained on the training set and then deployed on the test set to predict group membership. Multivariate analyses of variance were performed to confirm the significance of the overall analysis, and individual analyses of variance were performed to confirm the significance of each of the resulting linear discriminant axes. Two discriminant dimensions were identified between the groups: a dimension separating groups by the diagnosis of ASD (LD1: 87% of variance explained); and a dimension reflective of a diagnosis-by-sex interaction (LD2: 11% of variance explained). The strongest discriminant coefficients for the first discriminant axis divided the sample in domains with known differences between ASD and comparison groups, such as social difficulties and restricted repetitive behavior. The discriminant coefficients for the second discriminant axis reveal a more nuanced disparity between boys with ASD and girls with ASD, including executive functioning and high-order behavioral domains as the dominant discriminators. These results indicate that phenotypic differences between males and females with and without ASD are identifiable using parent report measures, which could be utilized to provide additional specificity to the diagnosis of ASD in female patients, potentially leading to more targeted clinical strategies and therapeutic interventions. The study helps to isolate a phenotypic basis for future empirical work on the female protective effect using neuroimaging, EEG, and genomic methodologies.

Autism Spectrum Disorder (ASD) is a developmental condition characterized by social and communication differences. Recent research suggests ASD affects 1-in-44 children in the United States. ASD is diagnosed more commonly in males, though it is unclear whether this diagnostic disparity is a result of a biological predisposition or limitations in diagnostic tools, or both. One hypothesis centers on the 'female protective effect,' which is the theory that females are biologically more resistant to the autism phenotype than males. In this examination, phenotypic data were acquired and combined from four leading research institutions and subjected to multivariate linear discriminant analysis. A linear discriminant model was trained on the training set and then deployed on the test set to predict group membership. Multivariate analyses of variance were performed to confirm the significance of the overall analysis, and individual analyses of variance were performed to confirm the significance of each of the resulting linear discriminant axes. Two discriminant dimensions were identified between the groups: a dimension separating groups by the diagnosis of ASD (LD1: 87% of variance explained); and a dimension reflective of a diagnosis-by-sex Introduction Autism Spectrum Disorder (ASD) is a developmental disability characterized by social and communication deficits (Elsabbagh and Johnson, 2007). Recent research suggests ASD affects 1 in 44 children in the United States (Christensen et al., 2018); this number has increased in recent years for several possible reasons: screening has improved, prevalence of ASD may in fact be increasing, and diagnostic capabilities may have improved. ASD diagnoses are usually confirmed when a child is quite young, and it is generally understood that earlier diagnoses and interventions result in more favorable social outcomes for those affected by ASD (Itzchak, 2011). Evidence suggests that ASD is diagnosed more commonly in males (Halladay et al., 2015;Irimia et al., 2017), though it is unclear whether this diagnostic disparity is a result of a biological predisposition or limitations in referral patterns, screening devices, and diagnostic tools, or all of these combined. One hypothesis centers around the 'female protective effect, ' which is the theory that females are biologically more resistant to the autism phenotype than males, to the point where they must be more severely affected to be classified as ASD by our current diagnostic standards (Robinson et al., 2013;Gockley et al., 2015;Zhang et al., 2020). To disambiguate this phenomenon, phenotypic survey batteries have become standard in autism research to better understand what behavioral and other measurable characteristics differentiate neurotypical children from their ASD counterparts. Indeed, previous research suggests that girls require a stronger manifestation of autistic traits to meet diagnostic criteria, which in turn suggests that girls are more likely to have ASD and not be diagnosed than boys (Ratto et al., 2018). Additional research has found that girls with ASD do exhibit a distinct behavioral profile, particularly in terms of ability to adapt behavior based on social context (Hiller et al., 2014), desire to be liked by others (Hiller et al., 2016), and ability to mesh within a same-sex social group (Dean et al., 2014;McQuaid et al., 2021). Aside from proposed biological mechanisms, phenotypic analyses may be able to identify which behavioral domains are most implicated in ASD diagnoses and whether redundancy and inefficiency can be identified within these measurement tools.
The phenotypic measures examined here were carefully selected to effectively capture the behavioral expression of these participants. The phenotype battery includes assessments of intelligence, executive function, language, and social skills (detailed further in the section "Materials and methods"). These domains provide a robust baseline by which we can differentiate behavioral characteristics between ASD and neurotypical participants, and between ASD males and ASD females.
The data discussed in this report is from a multimodal, longitudinal study on ASD uniquely suited to identify the cause of this apparent diagnostic discrepancy. The study consists of neuroimaging, EEG, genomic, and phenotypic data; as an initial assessment, only the phenotypic data is examined here. Eventually a large-scale multimodal analysis will be performed on these data to realize the full potential of this unique dataset, but a preliminary phenotypic analysis should provide a meaningful foundation on which future analyses can build. The following report is the initial attempt at classification analysis comprising all of the subscales of the phenotypic measures used in the study.

Inclusion/Exclusion criteria
Diagnosis and inclusion of the ASD participants was based on having a prior clinical or research diagnosis of ASD, the Autism Diagnostic Interview (ADI) and the Autism Diagnostic Observation Schedule (ADOS-3 and 4). For ADI inclusion, participants must have scored: greater than 8 on the communication subtotal; greater than 6 on the behavioral subtotal; greater than 1 on the social affect subtotal; greater than 18 on the sum of the previous three subtotals. For ADOS inclusion, ASD participants must have scored higher than 3 on the comparison score (used to compare across Modules 3 and 4). Both requirements needed to be satisfied for inclusion. For the comparison group, participants had no previously reported autism symptoms via parent report on the Social Reciprocity Scale (T-score < 60) or the Social Communication Questionnaire (raw score < 11), as well as no clinical impression of ASD. The comparison group was also devoid of diagnosis or behaviors suggestive of schizophrenia or any other learning, developmental, or psychiatric disorder. We previously report sex differences in developmental milestones and diagnostic variables in this sample of autistic youth (Harrop et al., 2021). All participants were required to score higher than 70 on the Differential Ability Scale composite measure of conceptual ability (an IQ proxy).
Exclusion of ASD participants was based on the presence of non-ASD-related genetic, neurological, or psychiatric comorbidity, including use of benzodiazepine, barbiturate, or anti-epileptic medication. Exclusion for the control participants included diagnosed, referred, or suspected ASD, schizophrenia, learning or intellectual disability, any other developmental or psychiatric disorders, and any first-or second-degree relative with ASD.

Recruitment and data collection
Participants were screened by reliably trained clinicians by telephone and in-person to ensure inclusion and exclusion criteria were met. The phenotypic measures that required clinician administration were collected in-person; these include: Differential Ability Scales-II (DAS) (Elliott et al., 2018), Vineland Adaptive Behavior Scales-II (VABS) (Sparrow et al., 2012), Clinical Evaluation of Language Fundamentals (CELF) (Semel et al., 2003). Phenotypic measures that were parentreport were completed at home by the family; these include: the Social Responsiveness Scale (SRS) (Constantino, 2013), Repetitive Behaviors Scale -Revised (RBSR) (Bodfish et al., 2014), the Child Behavior Checklist (CBCL) (Achenbach and Rescorla, 2000), and the Behavior Rating Inventory of Executive Function (BRIEF-2) (Gioia et al., 2017). In all, 35 predictors were included in this analysis. A full accounting of the demographic and clinical characteristics of the dataset can be found in Table 1.
The DAS is designed to assess intellectual functioning in school-aged children across several domains: verbal reasoning, non-verbal reasoning, and spatial reasoning. The Special Nonverbal Composite was used instead of the general non-verbal reasoning standard score because it has been shown to more accurately reflect the wide range of verbal capabilities for those affected with ASD (Riccio et al., 1997;Thurman and Hoyos Alvarez, 2020). For this analysis the standardized scores for each of these domains were used.
The VABS is designed to measure adaptive behavior skills required for day-to-day life. It has been used to help diagnose and classify developmental disorders, notably in those affected by ASD. VABS data was collected by parent report and is analyzed here using the standard scores of the main three domains: Communication, Socialization, and Daily Living Skills.
The BRIEF-2 is a measure designed to assess executive function in children and adolescents. It is comprised of three overarching indices (behavior regulation, emotional regulation, and cognitive regulation) with several domains within each index. The domains included in this analysis are the following: inhibit, monitor, shift, emotional control, initiate, working memory, plan/organize, and organization of materials. The overall indices were not included in order to achieve a more granular phenotypic analysis.
Frontiers in Neuroscience 03 frontiersin.org subscales, but unfortunately due to large amounts of missing data in our sample only two have been included in this analysis: recalling sentences and formulating sentences standard scores.
These two domains should provide a reasonable representation of language ability (Klem et al., 2015).
The RBSR is a measure designed specifically for use in the ASD population. It measures the quality and quantity of Frontiers in Neuroscience 04 frontiersin.org repetitive behavior in children with ASD, which is a fundamental aspect of the ASD phenotype. The six subdomains included in this analysis are the following: stereotyped behavior, selfinjurious behavior, compulsive behavior, ritualistic behavior, sameness behavior, and restricted behavior. Raw scores were used since this measure does not provide standard scores. The CBCL is designed to measure symptoms of emotional and behavioral problems in children and adolescents. The eight narrow-band syndrome scale T-scores were included in this analysis: Anxious Behavior, Withdrawn Behavior, Somatic Complaints, Social Problems, Thought Problems, Attention Problems, Rule Breaking Behavior, and Aggressive Behavior. We had previously reported sex differences in aggression in autistic male and female youth (Neuhaus et al., 2022).

Statistical analysis
Any measures missing more than 10 percent of the sample data points were removed from this analysis; these include the CELF-Receptive Word Classes, and CELF-Expressive Word Classes. For any remaining missing data, the Predictive Mean Matching data imputation method was implemented since the missing data was assumed to be missing at random. Data imputation was performed in R using the Multivariate Imputation via Chained Equations (MICE) and Visualization and Imputation of Missing Values (VIM) packages.
Participants were classified into four nominal classes: ASD male, ASD female, non-autistic male, and non-autistic female. Participants were randomly split into training and testing groups (75% training, 25% testing), and cross-validation was repeated ten times to ensure balance in the splits. A linear discriminant model was trained on the training set and then deployed on the test set to predict group membership.
Multivariate analyses of variance were performed to confirm the significance of the overall analysis, and individual analyses of variance were performed to confirm the significance of each of the resulting linear discriminant axes. All analyses were performed using the R statistical programming language utilizing the following packages: Classification and Regression Training (caret), and Modern Applied Statistics with S (MASS).
The visualization of results was performed using the tidyverse and ggplot2 packages. Table 2 shows the resulting confusion matrix from the initial linear discriminant analysis. The overall classification accuracy on the test set was 62.766%. Table 3 shows the classification statistics by class. Sensitivity (true positive rate) for the ASD groups was 65.22% for ASD females and 59.26% for ASD males; sensitivity for the control groups was 57.14% for the control females and 69.57% for the control males. Precision (positive predictive value) for the ASD groups was 55.56% for ASD females and 72.73% for ASD males; precision for the control groups was 57.14% for control males and 66.67% for control females.

Results
Three distinct linear discriminant axes (LD1, LD2, and LD3) resulted from this analysis. LD1 explains 87.16% of the between-class variance, LD2 explains 11.25% of the betweenclass variance, and LD3 explains the remaining 1.58%. Note that whether a coefficient is positive or negative corresponds to the direction in which a measure weight "pulls" the different groups; for example, high scores (and therefore high dysfunction) in the CBCL Social Problems subdomain result in the overall distribution being split between the ASD group  Linear discriminant axis 1 plotted against linear discriminant axis 2. Linear discriminant axis 1 plotted against linear discriminant axis 3. and the control group. This phenomenon is illustrated in

Discussion Overview
The multivariate results of the present study indicate the diagnostic groups are linearly discernible by two key dimensions present in the phenotypic test battery: (1) a dimension separating groups by ASD diagnosis (LD1: 87% of variance explained) and (2) a dimension representing a diagnosis-bysex interaction (LD2: 11% of variance explained). As evident in Figures 1, 2, there is a clear separation between the ASD and control group (LD1 axis), and there appears to be separation between the male and female ASD participants in Figure 1 (LD2 axis) but no such separation between male and female control participants. These results are confirmed in the class statistics table (Table 3), which displays sensitivity, specificity, and F-1 Score for each class. These are discussed in more detail below. A final dimension was not found to add to the ability to distinguish between the groups (LD3: 1.58% of variance explained) and so can be discounted. This provides compelling evidence for phenotypic differentiability between ASD males and ASD females.

Advantages of a linear discriminant analysis
While any number of statistical models or machine learning approaches could have been adopted and applied in the analyses of the data included in this study, many suffer from a lack of omnibus tests of inferential statistical significance. Moreover, the contributions of individual variables to measuring betweengroup differences are often difficult to assess or even have access to in certain machine learning approaches. This is not to say that such methods are deficient or inappropriate; rather, probabilistic, non-linear, or other methods may not necessarily provide actionable information having clinical utility. In contrast, despite its multivariate nature, linear discriminant analysis provides a parsimonious and interpretable means for characterizing differences between groups, leveraging the covariance structure existing between sets of variables, which can be tested for statistical significance, and, finally, where the relative contributions of variables can be determined. Thus, from a utility perspective, the linear discriminant analysis reported here likely has greater clinical applicability.
Illustrating the sensitivity to a significant sex-by-diagnosis interaction may inform initial clinical assessment, identify those factors driving such differences, and which may be useful for customizing any therapeutic strategies specific to females suspected of an ASD diagnosis. Whereas machine learning and other modern approaches can help computers distinguish between groups, here we emphasize the potential for human interpretable analyses which optimize clinical utility.

Classification metrics
The detailed class-wise statistics in Table 3 illustrate important context for this analysis. Sensitivity and precision both refers to the ability of the model to correctly identify members of a specific class but with different denominators: sensitivity is the true positives divided by the sum of true positives and false negatives, and precision is the true positives divided by the sum on true positives and false positives. The disparate sensitivity and precision values between the diagnostic groups reveal that, indeed, the linear discriminant model is highly accurate at distinguishing ASD from typically developing control participants. Also of note is the fact that the model was not as accurate differentiating the control males from control females as it was differentiating between ASD males and females, which indicates that these variables contribute only to the sexwise differences in the ASD group. Additionally, ASD females were less likely to be correctly classified compared to ASD males, which likely reflects the male-tending bias of many of the phenotypic assessments used for assessing ASD.

Contributing variables
The top discriminant variables in LD1 are the variables that exemplify the well-known differences between the ASD and neurotypical groups, such as difficulties with social interactions (CBCL social problems, Vineland Socialization), emotional control (CBCL Aggressive), and differences in effective communication (DAS Special Non-verbal, SRS Communication) (Elsabbagh and Johnson, 2007;Halladay et al., 2015). The difference in diagnostic group is apparent graphically in Figures 1, 2, the images that include LD1 as an axis.

Sex-by-diagnosis interaction
A particularly relevant finding of this analysis exists with the strongest coefficients from LD2, since this is the axis along which the divide between ASD males and ASD females was the clearest. Specifically, these include several BRIEF-2 indices (Shift; Plan/Organize; Monitor; Emotional Control) as RBS-R Restricted Subscale. well as two RBS-R subdomains (Restricted; Sameness). The presence of these measures in the linear discriminant axis most implicated in ASD male-female separation suggests they may be important in the detection of ASD based on behavioral measures alone. Indeed, when a second, confirmatory linear discriminant analysis was run using only these predictors (squared LD2 coefficient > 0.15; highlighted in bold in Table 4), the discriminant axes and plots were comparable to the original analysis with the full array of predictors. They also may provide insight into the sex differences present in the ASD phenotype. Additional analysis is likely required to better determine how the BRIEF-2 and RBS-R subscales discriminate between the groups of interest. It is important to note that of these two measures, the BRIEF-2 is sex-normed and the RBS-R is not; this could have impacted the relative strength of the RBS-R subscales separating males from females, but it strengthens the results that suggest the BRIEF-2 is identifying latent traits specific to a sex-by-diagnosis disparity.
The overall strongest discriminator in the sex-by-diagnosis axis was the RBS-R Restricted Behaviors subscale. The Sameness subscale from the RBS-R assessment was also among the top discriminants in the sex-by-diagnosis axis. This is an interesting  finding because previous research has indicated that repetitive behaviors can be subdivided into restrictive/repetitive sensory motor behaviors and insistence on sameness behaviors (Cuccaro et al., 2003;Bishop et al., 2013), which in other publications have been classified as low-order (restricted) and high-order (sameness) behaviors (Turner, 1999). Restricted behaviors can include dyskinesia, convulsions, and repeated manipulation of objects, while sameness behavior refers to a general insistence on routine consistency (Tian et al., 2022). The discriminant coefficients indicate these two subscales are representative of opposite group membership, where greater deficits in restricted behaviors are associated with ASD males and greater deficits in sameness behaviors are associated with ASD females.
Of the four BRIEF-2 subscales that most contributed to the ASD male-female discrimination, the Shift subscale was the strongest. This scale measures cognitive flexibility, or the ability to transition from one mental occupation to another (Gioia et al., 2000). The directionality of the Shift subscale coefficient in LD1 suggests that ASD participants exhibit far more dysfunction in this area than controls, which is corroborated by previous  findings (Gioia et al., 2002;Blijd-Hoogewys et al., 2014). However, the directionality of this coefficient in LD2 suggests that ASD females exhibit less dysfunction in this area than ASD males (this finding contradicts earlier research, which suggests the opposite (White et al., 2017). The fact that this subscale was also a strong discriminator in the sex-by-diagnosis interaction axis may represent a clue as to the cause of the sex-based diagnostic disparity, as an inability to shift freely from activities or situations may be quite obvious to an observer. For example, some items on the BRIEF-2 that contribute to the Shift subscale include questions about being disturbed by a change of teacher or thinking too much about the same topic. Being able to mask this deficit could impact the decision to diagnose a child with ASD.

Clinical implications
Males are diagnosed up to five times more frequently than females having ASD. Reasons posited for this effect involve the notion that females may require a greater environmental burden in order to cross the threshold normally seen in ASD males. Likewise, such a burden may have neurological and/or  genomic determinants. Examination of neuropsychological and behavioral assessments via detailed multivariate analysis illustrated that while typically developing males and females are indistinguishable, males and females diagnosed with ASD were clearly separable. Assessments maximally contributing to this sex-by-diagnosis interaction were reflective of executive function, cognitive, and emotional control as well as restricted behaviors. This suggests that, of the broad range of assessments included in the presence analysis, the BRIEF-2 and RBS-R may be particularly sensitive to these sex-driven differences. Neuropsychologists utilizing sub-scales of these metrics, in particular, may be able to better fine-tune options for clinical therapeutic strategies specific to females suspected of being on the Autism spectrum.

Future directions
The multimodal richness inherent in this dataset would be enhanced through the inclusion of neuroimaging and genomic data. Doing so would provide further evidence for a sex-based differences in the ASD phenotype as it relates to neurological and genomic contributions. Previous research has indicated strong evidence for genetic differences between ASD male and ASD females , which lends credence to the female protective effect hypothesis and may provide another avenue to analyze these data. Additional and intensive classification analyses, such as bagged random forests and support vector machines, focused on more targeted phenotypic variables could also help to refine the results of this preliminary analysis. Evidence from the ASD literature suggesting multimodal diagnosis methods can be more effective than the gold-standard survey methods by including such neurological tools as EEG biomarkers though these techniques are still being developed and are not sufficiently robust for definitive diagnosis (Tanu, and Kakkar, 2019). While measures employed here were able to be classified effectively with a parametric model is encouraging for future multimodal analyses on neuropsychological assessments, non-parametric methods could be advantageous for successful classification using timedependent data. Indeed, deep learning techniques deployed on EEG signal for ASD classification in other studies have achieved high accuracy and represent path toward automated ASD diagnosis (Wadhera et al., 2021), although the interpretability of deep learning models remains limited. Finally, this sample consists of highly verbal, average IQ ASD participants and most measures are parent-reported, which could have impacted the generalizability of the results. Using gender identity in addition to biological sex is another potential future direction, and our continued research has been diligent about collecting this information.

Final conclusion
A phenotypic battery of neuropsychological and behavioral assessments subjected to multivariate linear discriminant analysis revealed diagnosis, as well as sex-by-diagnosis related dimensions which distinguished ASD from typically developing control participants. Main drivers of the latter were sub-scales of the BRIEF-2 and RBS-R, both of which are measures pertaining to contextual behavior. These phenotypic assessments, in particular, may reflect useful means by which to tailor therapeutic interventions and clinical approaches specifically aimed at addressing ASD in females.