{'fraction_non_alphanumeric': 0.020345252774352653, 'fraction_numerical': 0.002466091245376079, 'mean_word_length': 5.364705882352941, '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}}
Shape‐Invariant Modeling of Circadian Rhythms with Random Effects and Smoothing Spline ANOVA Decompositions

Summary.  Medical studies often collect physiological and/or psychological measurements over time from multiple subjects, to study dynamics such as circadian rhythms. Under the assumption that the expected response functions of all subjects are the same after shift and scale transformations, shape‐ invariant models have been applied to analyze this kind of data. The shift and scale parameters provide efficient and interpretable data summaries, while the common shape function is usually modeled nonparametrically, to provide flexibility. However, due to the deterministic nature of the shift and scale parameters, potential correlations within a subject are ignored. Furthermore, the shape of the common function may depend on other factors, such as disease. In this article, we propose shape‐invariant mixed effects models. A second‐stage model with fixed and random effects is used to model individual shift and scale parameters. A second‐stage smoothing spline ANOVA model is used to study potential covariate effects on the common shape function. We apply our methods to a real data set to investigate disease effects on circadian rhythms of cortisol, a hormone that is affected by stress. We find that patients with Cushing's syndrome lost circadian rhythms and their 24‐hour means were elevated to very high levels. Patients with major depression had the same circadian shape and phases as normal subjects. However, their 24‐hour mean levels were elevated and amplitudes were dampened for some patients.