Here is the design of a clinical trial:

Official Title: Surgery for Cancer With Option of Palliative Care Expert: A Randomized Trial of an Early Palliative Care Intervention for Patients Undergoing Surgery for Cancer

Included conditions:
- Cancer

Study Armgroups:
- {'label': 'Palliative Care Intervention', 'type': 'EXPERIMENTAL', 'interventionNames': ['Behavioral: Palliative Care Intervention']}
- {'label': 'Standard of Care', 'type': 'NO_INTERVENTION'}

Interventions:
- {'type': 'BEHAVIORAL', 'name': 'Palliative Care Intervention', 'description': 'These patients will receive the palliative care intervention.', 'armGroupLabels': ['Palliative Care Intervention']}

Primary Outcomes:
- {'measure': 'Physical and Functional Quality of Life as Measured by the FACT-G TOI', 'description': 'FACT-Gastric Trial Outcome Index (TOI) is an efficient summary index of physical/functional outcomes and is comprised of two subscales from the FACT-Gastric Score: the physical wellbeing subscale (7 questions) and the functional wellbeing scale (7 questions). Each question uses a 5-point Likert scale ranging from 0 (Not at all) to 4 (Very much). Total scores on the FACT-TOI range from 0-56. The higher the score, the better the quality of life.', 'timeFrame': '90 days after operation'}

Please estimate the sample size based on the assumption: 
Type I error rate of 5%, common standard deviation of 9 in FACT-G TOI score and 18.1 in FACT-G total score, 80% power, 20% loss to follow-up, normal distribution for primary outcome, two-sample t test.
Sample size calculation and statistical analysis
        Previous studies have demonstrated a moderate effect (effect size approximatelyâ0.4) of early palliative care on TOI, the primary outcome of the SCOPE Trial [1]. Assuming a type I error rate of 5% and a common standard deviation of 9 in the FACT-G TOI score and 18.1 in the FACT-G total score in each group [12], enrolling 98 participants in each group (total Nâ=â196) would provide at least 80% power to detect a change of 3.6 points for TOI and 7.24 for total FACT-G (an effect size of 0.4). Minimally important difference for the total FACT-G is estimated to be 3â7 points and 2â3 points for each subscale [12], so the trial should be adequately powered to detect a clinically meaningful difference. The sample size computations were performed assuming a normal distribution for the primary outcome and using two-sample t test. Allowing for 20% loss to follow-up (we expect mortality to be very low at 90 days), we plan to enroll 236 patients to ensure an adequately powered study. Based on the mix of malignancies included in the study, we expect median survival to be approximately 36âmonths, so a substantial portion of patients should be alive at later time points, which will enable exploratory analyses with the long-term outcomes.
        Closer to the completion of the trial, the investigators and biostatisticians will develop a comprehensive statistical analysis plan (SAP) that will be made publicly available and will be time-stamped. The SAP will describe the analytic strategies used for the study and any prespecified subgroup analyses. The SAP will be completed while the biostatisticians remain blinded to the participantsâ group assignment, and any subsequent changes will be publicly noted to have occurred after the blind was broken. In developing our SAP, we will be ready to adopt novel statistical methods that are developed while the trial is ongoing. In what follows, we present a tentative outline for the approach that we will develop in detail in the SAP.
        The demographic and clinical characteristics of patients will be described using descriptive statistics. For continuous variables, median and interquartile range will be used while categorical variables will be described using frequency (percentage).
        For our primary analysis, we will perform multivariable regression to adjust for a priori-selected potential confounders, including age, frailty, cancer type, insurance status, education level, and degree of religious involvement. We will choose the type of multiple regression by carefully examining the distribution of the data. In the case of non-normally distributed outcomes, we will use a multivariable proportional odds regression model. For normally distributed outcomes, a linear regression model will be used. Cox proportional hazards regression will be used to analyze the adjusted effect of intervention on time-to-event outcomes such as survival, with censoring as appropriate based on the outcome and time point (for instance, the analysis of overall survival at 1 year will have censoring at 1 year for patients who have not died).
        For all primary analyses, we will adhere to intention-to-treat principles. Missing data will be imputed using standard model-based imputation methods, i.e., regression imputation where a model is fitted on the observed data and subsequently used to generate imputations for the missing values. Imputation of data will only be performed for baseline characteristics and not for outcomes, and the covariates will include only those obtained at baseline. The SAP will provide further details on the plans for missing data imputation. Non-linear effects of continuous variables will be fit using restricted cubic splines, and modern regression model building techniques will be used [23]. For long-term outcomes, missing data are common due to death and loss to follow-up. We will deal with this potential bias by estimating the principal stratum causal effect (i.e., survivor average causal effect) defined as the average causal effect among participants who would survive under either treatment [24]. Since the analysis of survivors with assessments may be susceptible to survivor bias, we will use an unadjusted composite endpoint approach as described by Lachin [25], where the composite endpoint will be defined as days between surgery and death if the patient dies prior to assessment, but if the patient survives and is successfully assessed, the outcome will be days between surgery and the assessment plus the assessment score. All covariates included in the adjusted models will be selected a priori and the model complexity will be based on the general rule that a model must fit no more than m/10 parameters to allow for proper multivariable analysis and to be generalizable to future patients, where m is the effective sample size [23].
        Graphical techniques will be used to perform model diagnostics and evaluate assumptions. Multicollinearity will be assessed using variance inflation factors and in the event of highly collinear variables, principal component analysis will be used. All models will be validated using the bootstrap internal validation approach and the cross-validation approach. No adjustment will be made for multiple comparisons when examining secondary a priori-defined outcomes [26, 27]. Caution will be exercised in the interpretation of results by noting the number of nominally significant tests that would be expected to occur by chance alone [28].
        Secondary and subgroup analyses will be prespecified and fully described in the SAP, and at the time of drafting it we will conduct a further review of the literatureto determine which prespecified subgroups are important to study. To alleviate issues caused by multiple testing, our planned subgroup analysis will purely be exploratory in nature and used to inform the design of future studies. Caution will be exercised in the interpretation of results by noting the number of nominally significant tests that would be expected to occur by chance alone [28]. P values will not be provided, instead effect sizes will be quantified, and confidence intervals will be provided. Results of subgroup analysis will be graphically illustrated. Currently, we plan to conduct exploratory analyses of the interaction of baseline age, frailty, and cognitive impairment with group assignment because older patients or those with frailty or cognitive impairment may be at increased risk for adverse outcomes and therefore more likely to benefit from the intervention. Such results could inform the design of future studies. Since the control group may receive additional palliative care consults at providersâ discretion and some patients in the intervention group may receive fewer visits than others due to missed appointments, palliative care consults for both groups will be monitored and described. Additionally, sensitivity analysis will be considered where dose of palliative care (i.e., number of visits/telephone calls completed) will be considered as an interaction term with treatment group. In these sensitivity analyses, palliative care will be included as a time-varying covariate. The details of these sensitivity analyses will be described in the SAP.