. Optimal designs for trials with discrete time survival endpoints. OA Epidemiology 2013 Dec 30;1(3):22.

Randomized controlled trials require a lot of labor, time, and money. To not waste these efforts and to get scientifically useful results, they need to be carefully planned beforehand. There has been a lack of knowledge on planning designs of longitudinal experiments where events are observed in discrete time, but recently some relevant articles about that topic have been published. In experiments of that type subjects are observed in time periods and a design is a combination of the total number of subjects, the number of time periods they are observed for, and the allocation of subjects to the control and experimental groups. A good design is the combination of these factors that guarantees a sufficient level of statistical power at minimal costs. The optimal design methodology is introduced on a basic level and an example shows that designs based on standard calculations are not necessarily the best choice.


Introduction
In many fields of science, researchers study a particular event in people's lives as they are interested in the timing and/or causation of event occurrence, such as recovery from anorexia nervosa 1 .A method to identify and investigate such events is to follow a group of subjects across time in a longitudinal study until they either experience the event or drop out from the study due to other reasons.
In the planning phase of a study it is important to select an appropriate metric of time, that is, a meaningful scale of time in which the event can occur.Time can be measured continuously or discretely.Time is measured continuously when the precise timing of event occurrence is known, and is measured discretely when the event is measured at preselected points in time or in time intervals.Measuring discretely rather than continuously implies the exact time of event occurrence is unknown and so it results in a loss of information.The choice for measuring time discretely rather than continuously should therefore be well justified 2 .In retrospective studies, time is often measured discretely because subjects may not be able to remember the exact time of event occurrence.In prospective studies, the budget may be limited and endpoints are assessed periodically.In addition, measuring too frequently may cause participation burden and increased rates of attrition and may also raise ethical objections, especially when taking a measurement puts a high burden on the participants.In epidemiology, discrete-time survival analysis is used in studies on the onset of alcohol and tobacco use and in studies on disease progress and relapse.
The metric of time is an important choice because it has an influence on the sample size to achieve a prespecified power level.Here we focus on the power to detect treatment effects in randomised controlled trials that compare one experimental condition with a control 3,4 .To conduct longitudinal trials where people are followed over time, a lot of labour, time and money are needed.Therefore, trials need to be carefully planned before they are actually conducted, and the best way is to calculate the optimal design in the planning phase of a trial.The optimal design is one of the designs that performs best with respect to some optimality criterion, for instance, the power of the test on treatment effect.Power is related to sample size and sufficient sample size ensures an effect of treatment is detected with large probability.
To plan a trial, researchers need to consider many aspects, for instance, how many participants should be recruited, how many of them should be randomised to the experimental condition and for how long they should be followed up.Guidelines on sample sizes and optimal designs for trials with continuous-time survival data have been studied in the past [5][6][7][8][9][10][11][12] and are implemented in software packages such as nQuery Advisor 7.0 13 , PASS 14 or Study Size 15 .These guidelines cannot be used for trials with discrete-time survival data because another metric of time is used.When subjects are measured discretely an important question is for how many time intervals they should be measured.This question is irrelevant for trials with portion of subjects recruited in the experimental group (p E ) and the attrition rate that is the proportion of subjects who leave the study between any two adjacent measurement occasions due to unforeseen reasons.A combination of the three quantities, (N, p and p E ), is called a design and should be defined in the planning phase of a study.In some cases one of the quantities is fixed beforehand and then the other two need to be calculated.For example, researchers may have limited time for conducting a trial or there are a limited number of participants that can enter a trial.However, when none of the quantities is fixed or limited, researchers need to decide about a good combination of all three quantities.
The variance of the treatment effect estimator is used to calculate the statistical power for the test on treatment effect and it is common knowledge that the power is maximised for minimised variance.Since the main interest of an experiment is to find an effect of the treatment with sufficient probability, the minimal variance of the treatment effect is used as an optimality criterion.However, different designs can give the same statistical power and therefore, a cost constraint is also considered while choosing a good design.The cost of the trial can be calculated in four different ways and for each way, a separate cost function has been defined.The first cost function is used when all subjects are followed till the end of the trial even if they have already experienced the target event.It can be used, for instance, when researchers are interested in measuring not only the target event but also some other outcomes.The second cost function is used when all subjects are meant to be followed till the end of the trial but some of them leave the study due to unforeseen reasons, such as moving out of town.So, this cost function takes attrition into account.The third cost function is used when subjects leave the study after experiencing the tially planned may be more efficient in terms of estimating and testing the treatment effect.

Optimal design
In the current approach, it is assumed that subjects are followed over multiple time periods that have equal and fixed length.Subjects may be followed over a prespecified maximum number of time periods or for a short amount of time.For instance, researchers want to conduct a study that lasts at most 12 months so they can observe subjects for 1, 2, ..., or 12 months.Measurements are taken at the beginning of the study and at the end of each time period but the particular event may occur at any time between the measurement points.So, time is measured discretely but the underlying process is continuous.Moreover, participants are randomised to one of two treatment groups, a control group and an experimental group, and these groups do not need to be equally sized at the beginning of the study.
In each time period, the event status is recorded for all subjects observed in that particular period.So, the data include multiple records for each subject until and including the time interval the subject either experiences the event or gets censored.For such data the conditional hazard probability of event occurrence in each time period can be modelled by using a GLM, such as a logistic regression model 2 .To calculate an optimal design, it is necessary to know the values of the hazard probabilities in the control group.
The parameters of the statistical model and the asymptotic covariance matrix are estimated by iteratively re-weighted least squares 26 .The last entry in the covariance matrix is the variance of the treatment effect estimator and its value depends on the survival probabilities in both treatment groups, the total number of recruited subjects in a trial (N), the number of time periods (p), the pro-continuous-time survival data because subjects are followed continuously rather than measured at some preselected points in time.In addition, the derivation of the optimal design and sample sizes calculations should be based on the model that is used for analysis once the data are collected.The Cox model is commonly used for continuous-time survival data 16 while discrete-time survival data are commonly analysed by means of a generalised linear model (GLM) 2 , so this gives another reason why sample size calculations for trials with continuous-time survival data cannot be used for trials with survival endpoints in discrete time.
The discrete-time survival approach was proposed by Cox 16 in the early 1970s, discussed by Kalbeisch and Prentice 17 and has been well presented by Singer and Willett 2,18,19 in the early 1990s.Recommendations for the design of trials with discrete-time survival endpoints have only been published recently, such as power analysis for simple randomised trials 20 and cluster randomised trials 21 , and the optimal number of time periods and allocation ratios [22][23][24] .These papers appeared in statistical journals and may not have drawn the attention of many epidemiologists while we believe the findings in these studies are also of importance to the audience of Open Access Epidemiology.The purpose of this contribution is to summarise the optimal design methodology given by us on a basic level.We do not include statistical equations or mathematical derivations but we explain the rationale behind the optimal designs on a basic level.Our PODSE 25 software can be used to actually calculate the optimal design of a trial without any knowledge of the underlying matrix algebra.An example shows that the optimal design does not necessarily require the control and experimental group to be of equal size.Also, it shows that a design with fewer time points than ini-The survival and hazard probabilities in both groups are shown in Figure 1.The rate of recovery at 11 years is 67% and 83% for the control and experimental conditions, respectively.The chance of recovery is highest after 2 years and lowest after 9 years of admission to the programme, and it is higher for people receiving the experimental condition.
Suppose patients do not leave the study after experiencing a recovery and are further observed to monitor their health.Since it is a longitudinal study, most likely there will be patients who leave the study due to other, unforeseen reasons and suppose in each year the attrition rate is 1%.To investigate the design of such an experiment we use the PODSE 25 program and our results are presented in Table 1.The paper by Herzog et al. 1 does not provide any information about the costs of recruiting and measuring participants, so we calculate optimal designs for four plausible combinations of the cost ratios: given budget and the cost of the study is obtained for a given desired power level.In such a way, the user can evaluate few alternative designs for a certain trial and decide which one is the best.To find the optimal design the user needs to specify the underlying survival function and the size of the treatment effect.Also, the cost function and costs ratios f 1 and f 2 need to be specified.The PODSE software is a standalone executable program that can be freely downloaded 27 .A more extensive introduction to this program, including the matrix algebra that is used within the program, can be found in another paper of ours 25 .

An application example: anorexia nervosa recovery
In modern society, many people live with serious psychiatric disorders.One of them is anorexia nervosa that is characterised, among others, by extreme food restriction, an abnormally low body weight and intense fear of weight gain.All people suffering from anorexia should get medical and/or psychiatric treatment and there are many studies on how to help patients with this disorder.One study discussed by Herzog et al. 1 investigates recovery from anorexia nervosa.In this research a group of patients were hospitalised and admitted to an inpatient treatment programme that consisted of individual psychotherapy with behavioural and psychodynamic elements, group psychotherapy and consulting a social worker.However, after the treatment patients exhibit a low recovery rate.
Let us assume there is a new treatment for anorexia that increases recovery rates.This experimental treatment can be compared with the treatment presented by Herzog et al. 1 in a randomised controlled trial.The survival and hazard curves illustrated in their article can be used as survival and hazard curves for the control group.Moreover, let us assume that the experimental treatment has an effect of size 0.5 on the logit scale.event and attrition is absent, whereas the fourth cost function is used when subjects leave the study after experiencing the event and some attrition may be present.Each cost function is a function of the number of recruited subjects, the number of subjects observed in each time period and two cost ratios.The first cost ratio compares the costs of recruitment in both treatment groups (ƒ 1 ) and the second cost ratio relates the costs of recruiting one subject in a control group to the costs of an additional repeated measurement of one subject (ƒ 2 ).The optimal design is the combination of the total number of recruited subjects, the number of time periods and the proportion of subjects recruited in the experimental group that gives a sufficient power level at minimal cost or maximises the power for a given budget.If the optimal design cannot be used in the trial at hand or if researchers do not want to conduct it for whatever reason, an alternative design can be found using the relative efficiency measure.This measure compares the optimal design to any alternative design and shows how often the alternative design should be replicated to be as efficient as the optimal design.When relative efficiencies are larger than 0.8 or 0.9, the alternative design is highly efficient.
Using the presented approach only locally optimal designs are found because they are calculated for given values of the survival probabilities, the size of the effect treatment, the maximum number of time periods and the cost ratios.The formulae for calculating such designs are derived using matrix algebra, but they are complicated and cannot be easily used by researchers planning a trial.To help finding the optimal design, the user-friendly interface computer program PODSE 25 has been created.In this program locally optimal designs are found, relative efficiencies of alternative designs are plotted, the statistical power is calculated for a to 1663 and the number of patients slightly decreases to 260.However, if the follow-up time is prolonged then these two quantities change even more.For example, if two equally sized groups are followed up for 8 years then 232 patients can be recruited and the costs are equal to 1699, but if they are followed up for 10 years then 218 patients can be recruited and the costs are 1795.

Discussion
It is important to study optimal designs for trials with discrete-time survival endpoints because in many experiments time cannot be measured continuously.Therefore, a large research project is currently investigating designs for such trials.The research summarised in this article is just a part of that project and more optimal design recommendations can already be found in the literature, for instance, for trials where subjects are recruited at different points in time 28 and for trials with long-term survivors (i.e.subjects who will never experience the event) 29 .We also studied the effect of predictive covariates on statistical power levels 30 .More research is still being conducted and will be presented in the near future.
Until recently, sample size formulae and optimal design recommendations were not available for trials with discrete-time survival endpoints.Findings for trials with continuoustime survival endpoints could not be used for reasons already discussed in the introduction section.The example shows that a trial with equal allocation to the experimental and control groups is not necessarily the best choice.Also, using fewer time intervals than initially planned may increase efficiency.This illustrates the advantage of our optimal design methodology over standard approaches.
Of course, some assumptions should be made before an optimal design can be derived.We did not cost ratio ƒ 2 decreases).This result is also intuitively sound as it makes sense to take fewer measurements and to sample more subjects when it becomes more expensive to take a measurement.
Table 1 also shows the required number of subjects N and related costs to achieve power levels of 0.8 or 0.9.As one can expect, more subjects are needed to achieve a higher power level and this results in higher trial costs.It should be mentioned that the costs not only depend on the number of subjects N but also on the allocation ratio p E and the number of time periods p.When (ƒ 1 , ƒ 2 ) = (5, 2) a total of 268 subjects are needed and the costs are equal to 1598.When (ƒ 1 , ƒ 2 ) = (5, 5) slightly fewer subjects are needed but the costs decrease much because the proportion of subjects assigned to the experimental condition decreases and the number of time periods increases.
If researchers prefer an alternative design instead of the optimal one, the costs of the trial will be higher and the total number of patients will be smaller.Figure 2 shows relative efficiencies for alternative designs when (ƒ 1 , ƒ 2 ) = (5, 2).The optimal number of time periods is 6 and the optimal proportion of allocation to the experimental group is 0.39, but a trial with 6 time periods and equally sized groups has high efficiency.The costs of this trial slightly increase (ƒ 1 , ƒ 2 ) = (5, 2), (5, 5), (10, 2), (10, 10)  by fixing the value of the cost of recruiting one patient in the control group to 1 and using the second cost function.Both cost ratios are greater than 1, which implies the costs for a subject in the experimental condition are higher than those in the control and the costs to include a subject are higher than the costs to take a measurement.We believe such cost ratios are plausible for the experiment at hand.
Table 1 lists the optimal number of time periods p and the proportion of subjects who are allocated to the experiment condition p E for each pair (ƒ 1 , ƒ 2 ).We observe that the allocation proportion p E decreases when the cost ratio ƒ 1 increases.This result is intuitively sound as it implies fewer subjects are allocated to the experimental group when the costs per subject in the experimental group increase relative to those in the control group.For instance, 39% of the subjects are randomised to the experimental group when ƒ 1 = 5, but 35% are randomised to this condition when this cost ratio increases to ƒ 1 = 10 (while fixing ƒ 2 to 2).Furthermore, we observe the optimal number of time periods p increases when at least one cost ratio increases.This shows that the optimal number of time periods decreases when it becomes more expensive to take a measurement (i.e. when the Table 1 Optimal designs (N, p, p E ) = (total number of recruited patients, number of years, proportion of patients in the experimental group) with power of 0.8 or 0.9 and the costs of these designs for varying values of cost ratios ƒ 1 (costs of recruiting one patient in experimental group/costs of recruiting one patient in control group), ƒ 1 (costs of recruiting one patient in control group/ costs of additional measurement per patient) for the anorexia nervosa example  31 .With Bayesian optimal designs a prior distribution, rather than a range, is used for all model parameters and the optimal design is found over this prior distribution.

Conclusion
This article summarizes studies on finding locally optimal designs for take into account the possibility of recurrent events, such as multiple occurrences of relapse after periods of recovery in the anorexia example.Also, we ignored the possibility of competing events, such as multiple causes of death in a study on survival from some disease.The choice of the cost function should also be carefully justified as it has an effect on the design.We assumed subjects did not get censored after event occurrence and we allowed for the possibility of drop-out due to other reasons than event occurrence.Measuring after event occurrence implies increasing costs and taking drop-out into account means the optimal number of time intervals increases 22 .
Furthermore, it should be mentioned that with the proposed methodology locally optimal designs are calculated.In other words, the optimal designs depend on the values of the model parameters, that is, the underlying survival function and treat-

Figure 1 :
Figure 1: Survival and hazard probabilities of anorexia nervosa recovery in the control and experimental groups.
in the experimental group number of time periods

Figure 2 :
Figure 2:Relative efficiencies for anorexia nervosa recovery example with (ƒ 1 , ƒ 2 )=(5, 2), where the dot represents the optimal design and each contour line is a collection of designs (p, p E ) that have the same relative efficiency.