Here is the design of a clinical trial:

Official Title: Evaluating the Efficacy of Intranasal Oxytocin on Pain and Function Among Individuals Who Experience Chronic Pain: a Multisite, Placebo-controlled, Blinded, Sequential, Within-subjects Crossover Trial

Included conditions:
- Chronic Pain

Study Armgroups:
- {'label': 'Crossover sequence 1: Oxytocin first', 'type': 'OTHER', 'description': 'Patients receive 2-weeks courses of 24-IU oxytocin, placebo, 48-IU oxytocin.', 'interventionNames': ['Drug: 24-IU oxytocin', 'Drug: 48-IU oxytocin', 'Drug: Placebo']}
- {'label': 'Crossover sequence 2: placebo first', 'type': 'OTHER', 'description': 'Patients receive 2-weeks courses of placebo, 24-IU oxytocin, 48-IU oxytocin.', 'interventionNames': ['Drug: 24-IU oxytocin', 'Drug: 48-IU oxytocin', 'Drug: Placebo']}

Interventions:
- {'type': 'DRUG', 'name': '24-IU oxytocin', 'description': 'Patients will self-administer a 2-week course of 24-IU intranasal oxytocin \\[4-IU per puff (12-IU delivered to each nostril); Syntocinon, Novartis, Switzerland\\], twice per day (once in the morning and once in the evening).', 'armGroupLabels': ['Crossover sequence 1: Oxytocin first', 'Crossover sequence 2: placebo first']}
- {'type': 'DRUG', 'name': '48-IU oxytocin', 'description': 'Patients will self-administer a 2-week course of 48-IU intranasal oxytocin \\[4-IU per puff (24-IU delivered to each nostril); Syntocinon, Novartis, Switzerland\\], twice per day (once in the morning and once in the evening).', 'armGroupLabels': ['Crossover sequence 1: Oxytocin first', 'Crossover sequence 2: placebo first']}
- {'type': 'DRUG', 'name': 'Placebo', 'description': 'Patients will receive an intranasal placebo containing the same ingredients as the oxytocin nasal spray with the exception of active oxytocin. Administration schedule and procedure will be identical to that described in 24-IU oxytocin.', 'armGroupLabels': ['Crossover sequence 1: Oxytocin first', 'Crossover sequence 2: placebo first']}

Primary Outcomes:
- {'measure': 'Pain intensity', 'description': 'Pain severity index on the Brief Pain Inventory - Short Form (BPI-SF). Mean scores range from 0 to 10 with higher scores indicating greater pain.', 'timeFrame': 'Change from Day 1 to Day 14 of nasal spray administration.'}
- {'measure': 'Pain-related interference', 'description': 'Pain interference index on the Brief Pain Inventory - Short Form (BPI-SF). Mean scores range from 0 to 10 with higher scores indicating greater pain-related interference.', 'timeFrame': 'Change from Day 1 to Day 14 of nasal spray administration.'}

Please estimate the sample size based on the assumption: 
Overall type I error rate of 0.05, using O'Brien and Fleming's method for interim analysis, Sidak method for multiple comparisons (α=0.0127), SD of 2.0 for pain intensity and physical function, block-based symmetric correlation matrix, and a potential attrition rate of 20%.
Sample size calculation
        We based our sample size calculation on the number of patients needed to evaluate a clinically significant reduction in pain intensity and improvement in physical function of the primary outcomes: change in pain intensity and physical function from day 1 to day 14 that occurs between conditions (24âIU oxytocin vs placebo; 48âIU oxytocin vs placebo). The hypothesis tests are one sided and the trial is powered using a sequential, repeated-measures crossover design with one interim analysis to monitor the preliminary activity of the 24âIU and 48âIU doses of oxytocin relative to placebo (refer to section 3.2.1 for greater detail on the interim analysis).
        The overall type I error rate will be 0.05 and the OâBrien and Flemingâs method77 will be used to control for the inflation of type I error due to the interim analysis. The interim analysis will be conducted when primary outcomes are available for half of the proposed sample. The Sidak method78 will be used to adjust for multiple comparisons (ie, Î±=0.0127 after adjusting for 4 comparisons: 24âIU and 48âIU doses of oxytocin compared with placebo for pain intensity and physical function). Based on previous research with chronic pain populations,58 we assume a SD of 2.0 for pain intensity and physical function and a block-based symmetric correlation matrix under which the 2-week correlation within the same arm is assumed to be 0.863; the subcorrelation matrix of day 1 and day 14 pain intensity and physical function across two arms is comparable for any two arms; and the correlation of day 1 and day 1 on two arms equals that of day 14 and day 14. We anticipate that the correlation of day 1 and day 14 cross-arms will be lower than the correlation of the same day pain intensity/physical function. As a conservative measure, we assume the correlation of day 1 and day 14 is comparable to the same day correlation cross two arms and a better power will be achieved if the correlation between day 1 and day 14 is lower. The sample size is determined as the largest for two scenarios on whether the subcorrelation matrix of day 1 and day 14 is stable over phases or not.
        For the scenario of stable subcorrelation matrix of day 1 and day 14, all phases data will be included in the analysis. Target power is 0.9 to detect a 0.5 SD difference in pain intensity/physical function, which corresponds to an effect size of 0.56 for the outcomes of change between day 1 and day 14 under the aforementioned assumptions on the covariance matrix. The required sample size is 41 per province to accommodate one interim analysis. If the subcorrelation matrix of day 1 and day 14 is unstable cross phases, only the first two phases data will be included in the analysis and the size for evaluating the efficacy of the 24âIU and 48âIU over the placebo is reduced to 2/3, where the two samples are independent (Î±=0.0127 using Sidak). Under this scenario, the power is set as 0.8 for the same effect size and the required sample size is 54, which is increased to 81 accounting for abandoning the phase III data due to instability of the correlation. Therefore, the sample size of 81 per province will be used and this is the robust size to guarantee at least 80% power and an overall type I error of 0.05 with an interim analysis for different scenarios of the correlation matrix of pain intensity/physical function. The covariates of sex and province will be adjusted and the rule of 8 additional cases per covariate will be followed for the combined analysis on the efficacy of 24âIU and 48âIU oxytocin relative to placebo. Accounting for a potential attrition rate of 20% and the balance among the 2 sequences per province, a total sample of 336 patients (112 per province) is required.