Posttraumatic stress disorder (PTSD) is a common, chronic, and debilitating psychiatric condition in Veterans. Beyond psychiatric features, PTSD has been linked multiple physical health conditions due to poorer health behaviors and dysregulation of biological processes such as immune dysregulation and chronic inflammation. Prior evidence has indicated an association between PTSD and risk for autoimmune (AI) conditions, a group of over 80 complex diseases involving self-reactive immune responses. However, research linking PTSD and AI disease risk has largely focused on only a few prevalent AI conditions, has not estimated potential causal relationships, has been in European mostly White samples, and has not examined risk or mitigating factors. Causal methods, such as marginal structural modeling, can account for time-varying factors in observational data to better estimate causal links between factors, providing more precise inferences than prior associational studies. Additionally, research is needed to determine associations between PTSD and all AI diseases, which are largely heterogeneous but share underlying etiology. Indeed, determining links between PTSD and certain forms of AI dysregulation may point to patterns of immune processes that underlie disease risk. Given higher rates of PTSD and some AI diseases in racial or ethnic minority groups, it is necessary to explore potential health disparities in associations between PTSD and AI disease. Moreover, other important risk or protective factors influencing AI disease risk in PTSD can be examined empirically by utilizing a large clinical sample and testing multiple predictors in a machine learning context. Relatedly, no studies have determined whether treatment for PTSD, such as antidepressants or evidence-based psychotherapy, may mitigate AI disease risk among individuals with PTSD. This study is designed to respond to these gaps in the literature by estimating causal associations between PTSD and AI disease in a large, diverse sample of US Veterans. The first aim is to estimate the causal impact of PTSD on AI disease risk (e.g., any AI disease, individual AI conditions) and examining the effect of psychiatric comorbidity (e.g., multiple psychiatric diagnoses) on AI disease. The second aim is to determine whether race and ethnicity modify the association between PTSD and AI disease and to use data-driven methods to explore clinical factors that increase or mitigate risk for AI disease in those with PTSD. The third aim is to investigate whether receiving treatment (e.g., antidepressant medications, psychotherapy) for PTSD attenuates risk for AI disease compared to those with PTSD not receiving treatment. For all aims, data from national VA electronic health records (EHR) of approximately 9 million Veterans will be accessed and analyzed to identify diagnoses of PTSD, AI disease, and relevant covariates across time. We will apply marginal structural models, machine learning algorithms for featu...