Exact sample size determination for a single Poisson random sample

Classical power analysis for sample size determination is typically performed in clinical trials. A “hybrid” classical Bayesian or a “fully Bayesian” approach can be alternatively used in order to add flexibility to the design assumptions needed at the planning stage of the study and to explicitly incorporate prior information in the procedure. In this paper, we exploit and compare these approaches to obtain the optimal sample size of a single‐arm trial based on Poisson data. We adopt exact methods to establish the rejection of the null hypothesis within a frequentist or a Bayesian perspective and suggest the use of a conservative criterion for sample size determination that accounts for the not strictly monotonic behavior of the power function in the presence of discrete data. A Shiny web app in R has been developed to provide a user‐friendly interface to easily compute the optimal sample size according to the proposed criteria and to assure the reproducibility of the results.


INTRODUCTION
The sample size determination (SSD) is a crucial element of the planning phase of any clinical trial, and it is usually conducted through a pre-experimental power analysis.In general terms, the purpose is to select the smallest sample size that allows to achieve a desired level for the probability of correctly rejecting the null hypothesis,  0 .The traditional procedure consists in selecting a fixed design value for the parameter of interest under the alternative hypothesis and in using it to evaluate the conditional probability of rejecting  0 computed under a frequentist framework.The prespecified design value plays a key role and should be carefully selected as a clinically relevant effect size that we wish to detect with high probability.An obvious drawback of the method is that the determination of the sample size may be strongly affected by the choice of this point alternative.To account for the uncertainty about the design effect size, a so-called "hybrid" classical Bayesian approach can be adopted (see Spiegelhalter et al., 2004) by averaging the traditional power function using a prior distribution for the unknown parameter.In the literature, this approach has been implemented to obtain an unconditional probability of the success of the trial (see, for instance, Carroll, 2013;Chuang-Stein, 2006;O'Hagan et al., 2005;D. G. Chen & Ho, 2017).In line with other works (see Ciarleglio & Arendt, 2019;Lan & Wittes, 2012;Sambucini, 2017), we suggest to use a prior distribution for , named the design prior distribution, that formally introduces uncertainty of the guessed design value under the condition that it belongs to the alternative hypothesis.In this way, the average of the classical power more closely resembles the concept of frequentist power, since it is computed under the assumption that the alternative hypothesis is true and, therefore, can be interpreted as a probability of making the correct decision.
Alternatively, it is possible to adopt a "fully Bayesian" approach that exploits only Bayesian concepts both at the analysis and at the design stage of the trial.Since the early 2000s, there has been growing interest within the pharmaceutical industry in the use of Bayesian procedures at various stages of the research.The U.S. Food and Drug Administration (FDA) Guidance for the Use of Bayesian Statistics in Medical Device Clinical Trials (2010) recognizes the merits of Bayesian methods and provides detailed recommendations for their use in FDA-regulated clinical trials.The recent status of Bayesian statistics in terms of regulatory acceptance by the FDA is addressed in Campbell (2020).A prior distribution, called the analysis prior distribution, is introduced to formalize pre-experimental information available on the unknown parameter and is used to compute the posterior distribution.The null hypothesis is rejected if the posterior probability assigned to the alternative hypothesis is sufficiently high.Then, the sample size is determined by ensuring a large level for the probability of rejecting  0 , under the assumption that the alternative is true.Analogously to the procedures based on a frequentist final analysis, this optimistic assumption can be realized either by setting a fixed design value suitably selected under the alternative hypothesis or by eliciting a design prior distribution to account for uncertainty in the guessed parameter value.Wang and Gelfand (2002) provided an exhaustive formulation of this approach for SSD, known as the two-priors approach, that was subsequently adopted by several authors (see, among others, De Santis, 2006;Matano & Sambucini, 2016;Psioda & Ibrahim, 2019;Sahu & Smith, 2006).Applications of both the hybrid classical Bayesian and the fully Bayesian approaches when the focus is on the mean of a normal distribution or a single binomial proportion are provided by Gubbiotti and De Santis (2008) and Sambucini (2017), respectively.
In this paper, we address the problem of SSD based on power analysis when the focus is on a single Poisson rate.In clinical trials, for instance, in certain chronic diseases, such as angina pectoris and epilepsy, symptoms manifest acutely in an episodic nature and it is assumed that the number of attacks for a given patient within a specified time interval follows a Poisson distribution (Layard & Arvesen, 1978).Examples of single-arm noncontrolled studies based on count data are provided by Stein et al. (2009) and Wasserman et al. (2011), where the number of acute serious bacterial infections is used as primary endpoint to test the effectiveness of immunoglobulin replacement therapies in patients with primary immunodeficiency disease.In this context, the commonly used SSD procedures are based on the application of classical power calculations with normal approximations.An exact approach to determine the minimum sample size for estimating a Poisson parameter, such that the prespecified levels of relative precision and confidence are guaranteed, has been provided in Z. Chen and Chen (2016).Bayesian approaches have been also used.For instance, Stamey et al. (2004) used the average coverage criterion for a single Poisson rate with underreported data.These authors exploited simulation-based methods based on a Bayesian symmetric interval estimator.Their approach has been extended by Stamey et al. (2006), who exploited the highest posterior density interval for the single Poisson rate and also implemented the average length criterion and a posterior variance criterion.Interval-based Bayesian criteria have been also proposed in Zaslavsky (2010), where prior data are used to express uncertainty about the Poisson event rate through an empirical procedure.Moreover, Zaslavsky (2012) determined the sample size for the estimation of a Poisson rate using the concept of conditional power and reformulating the Type I and II error probabilities in terms of confidence and credible limits.Furthermore, for phase II single-arm trials, Hand et al. (2016) extended the standard scheme to conduct a two-stage design to the case of a Poisson-distributed response variable and constructed a Bayesian predictive two-stage design.
We consider a single-arm trial where the primary endpoint is the number of events occurring in a given time period and follows a Poisson distribution.To the best of our knowledge, for this experimental situation, implementations of exact SSD methods based on power analysis exploiting the classical Bayesian hybrid and the fully Bayesian approaches has not been presented in the literature.We illustrate how to derive these criteria that allow to add flexibility to the classical procedure.Furthermore, to take into account the discrete nature of the data and the consequent sawtooth behavior of the power functions as the sample size varies, we suggest adopting a conservative criterion to have the conditions of interest satisfied for all sample sizes greater than the one selected (see Chernick & Liu, 2002;Sambucini, 2017).Finally, let us notice that we exploit exact distributions, instead of relying on asymptotic normality, and we perform the required computations by enumerating the probabilities of all the possible results.Thus, no simulation tools are involved to obtain numerical results.
The rest of the paper is organized as follows.In Section 2, we formalize the problem setting and describe the exact SSD criteria for single-arm trials based on Poisson data, when both "not desired" and "positive" events are considered.In Section 3, we provide suggestions on the choice of the prior distributions involved either to formalize prior information or to represent design expectations.Numerical results are presented and discussed in Section 4, where a case study example is also presented.An interactive Shiny web application has been developed to facilitate the implementation of the proposed criteria, and in Section 5 we provide the link to access.Finally, a brief discussion is provided in Section 6.

SSD METHODS FOR POISSON DATA
Let us consider a clinical trial aimed at evaluating the efficacy of a new experimental treatment through a single-arm study.The primary endpoint  is the number of occurrences of an event of interest over a prefixed interval of time.Thus, for each of the  patients enrolled in the study, we observe the random variable   that follows a Poisson distribution of rate  > 0.Moreover, without loss in generality, we assume that the event of interest has a negative connotation so that the focus is on testing  0 ∶  ≥  0 versus  1 ∶  <  0 .The target event rate  0 is a fixed value that should ideally represent the true rate for the standard of care therapy and is typically selected by exploiting historical data.The aim of this section is to derive exact criteria to determine the optimal value of  based on prestudy power analyses.The first approach considered is the classical one, which requires an initial guess about the true value of the unknown parameter.Then, in order to add flexibility to the procedure, we describe how to implement criteria based on a hybrid classical Bayesian approach and a fully Bayesian approach.

Classical approach
We aim at using exact sample size procedures, and, therefore, we focus on the frequentist rejection region of  0 based on the sufficient statistic   = ∑  =1   , whose sampling distribution is where pois(⋅; ) denotes the probability mass function of a Poisson variable of parameter .The null hypothesis is rejected at the fixed significance level , if   ≤   , where the critical value   is such that In fact, due to the discreteness of the test statistic, it is not possible to hit the nominal level  exactly and the standard exact procedure ensures that the actual Type I error rate is smaller than or equal to the fixed  (see Ryan, 2013).The traditional frequentist SSD criterion is based on the conditional probability of being able to make a correct decision in favor of the alternative hypothesis.A suitable design value of ,   , which represents a clinically relevant value important to detect, is suitably fixed under the alternative hypothesis.Then, the focus is on the so-called conditional frequentist power, defined as the probability of correctly rejecting  0 when the actual  is equal to   , The typical criterion selects the optimal sample size as the smallest  such that    () > , where  is a desired prefixed threshold.Since it is not possible to obtain a closed-form formula for the sample size, we need to use a numerical procedure that searches upwards from a minimum value of  until the condition is satisfied.
However, this way of proceeding does not take into account the not-monotonically increasing behavior of    () as a function of .The conditional frequentist power in (1), in fact, tends to increase showing a sawtooth behavior that typically occurs when dealing with discrete data.A discussion about this behavior in the presence of a binary endpoint is provided in Chernick and Liu (2002) and Sambucini (2017).To provide an example, in Figure 1, we plot    () with respect to  when  0 = 2,   = 1.6, and  = 0.05.To analyze in detail the reasons for this sawtooth shape for count data, for each possible value of  between 5 and 85, in Table 1 we report the corresponding critical value   and the value of the conditional frequentist power.We can note that the oscillations depend on how   increases with the sample size.The critical value, in fact, depends on the distribution of   when the null hypothesis is true.Thus, when we increase the sample size by as a function of , when  0 = 2,   = 1.6, and  = 0.05.

TA B L E 1
Critical value and conditional frequentist power as  varies, when  0 = 2,   = 1.6, and  = 0.05.one, if   increases by 2 units, that is the expected number of events under  0 , then the power gets larger.Otherwise, the power decreases.We use alternate blocks of colors to underline when these fluctuations happen, and we can note that they are more frequent for smaller sample sizes.

𝒏
In line with other works, in order to account for this fluctuating trend, we suggest to adopt a more conservative SSD criterion by selecting the smallest sample size for which    () exceeds the desired level  at all larger sample sizes, that is Also in this case, it is necessary to proceed numerically by evaluating the condition of interest for decreasing values of the sample size, starting from a very high value, until reaching the optimal one.According to this conservative criterion, the optimal sample size of the illustrative example is    = 75, while the lower value 72 allows to achieve the desired level of power without accounting for the fluctuating behavior.

Hybrid classical Bayesian approach
The SSD criteria based on the classical approach suffer from local optimality because the selected sample size is strongly affected by the choice of the design value   , whose uncertainty is not addressed.To overcome this limit, we suggest to use a hybrid classical and Bayesian procedure that allows to model uncertainty on the design value using a prior distribution according to the Bayesian approach, while still analyzing the data in a frequentist framework.Specifically, we elicit the so-called design prior distribution,   (), and then we obtain the predictive frequentist power by averaging the traditional frequentist power with respect to this prior.It can be proved that this is equivalent to compute the probability of rejecting  0 with respect to the prior predictive distribution of the data (see, for instance, Spiegelhalter et al., 2004;Gubbiotti and De Santis, 2008;Sambucini, 2017).
In the case of Poisson data, it is useful to introduce a gamma design prior distribution, where gamma(⋅|, ) denotes the probability density function of a Gamma distribution with shape parameter  > 0 and rate parameter  > 0.Then, the corresponding prior predictive distribution of   is where bin-neg(⋅; , ) is the probability mass function of a Negative Binomial distribution with parameters  and .Therefore, the predictive frequentist power is given by where ℙ   (⋅) denotes the probability measure associated with prior predictive distribution of   .Since the marginal distribution   (  ) is discrete, also    () presents a sawtooth behavior as a function of .Therefore, we recommend to select the optimal  according to the conservative criterion described above, that is for a fixed threshold .Note that, when using this approach, it is essential to restrict the design prior distribution, which plays the key role of weight function, to assume that the alternative hypothesis is true.This ensures that the predictive frequentist power is conceptually analogous to the conditional one in that it provides a measure of the probability of correctly rejecting  0 .

Bayesian approach
When planning a clinical trial, we may wish to take into account prior knowledge available and derived from various sources, such as historical data, pilot studies, expert opinions, etc.In this case, it is necessary to assume that a Bayesian analysis will be performed at the end of the trial.The prior information can be represented through a prior distribution,   (), that in this context is typically called analysis prior distribution.Differently from the design prior, it plays the role of the usual prior distribution introduced to formalize pre-experimental knowledge in a Bayesian analysis and used to compute the posterior distribution.
In our specific case, we rely on conjugate analysis and assume that  follows a Gamma prior distribution,   () = gamma(  ,   ).Given the observed result   , the posterior distribution is still a Gamma density with updated parameters,   (|  ) = gamma(  +   ,   + ).In a pre-experimental setting and under a Bayesian framework, we need to establish a condition to reject the null hypothesis on the basis of the random result   .Typically, the null hypothesis is rejected if its posterior probability is less than or equal to a threshold , chosen as a small value.Equivalently, we can claim that we reject the null hypothesis if the posterior probability that  belongs to the alternative one is sufficiently high, that is if where ℙ   (⋅|  ) is the probability measure associated with the posterior distribution of  and  Gamma (⋅; , ) is the cumulative distribution function of a Gamma variable of parameters  and .For a fixed value of , the posterior probability in (4) increases as   decreases and we can find an integer   such that  Gamma ( 0 ;   +   ,   + ) > 1 −  and  Gamma ( 0 ;   +   + 1,   + ) ≤ 1 − .
Therefore, the Bayesian rule consists in rejecting  0 if the experimental result is such that   ≤   , where In other words,   is the largest total number of events out of  patients that leads to reject  0 .Hence, when a Bayesian final analysis is planned, the power of the study can be obtained by computing the probability that   ≤   , under the assumption that the alternative hypothesis is true.It is possible to exploit a conditional approach by specifying a suitable design value   for the parameter of interest under  1 .Then, we obtain the conditional Bayesian power as the probability of rejecting  0 computed with respect to the sampling distribution of   conditional on   , Alternatively, to avoid local optimality, we introduce a design prior distribution that models uncertainty on the guessed value   .In this latter case, the prior predictive distribution of   provided in (2) is used to obtain the predictive Bayesian power Since both the sampling and the marginal distributions of   are discrete, we suggest to select the optimal sample size according to the conservative criterion described above to account for the sawtooth behavior of the Bayesian power functions.Given the threshold of interest , the criteria are

Reversal of hypotheses
The majority of the clinical studies based on Poisson outcomes refer to the count of "negative" events, and examples include the number of falls for patients with Parkinson's disease, of asthma attacks in children, of relapses, of scan lesions in multiple sclerosis, or of seizures in epilepsy.Thus, without loss in generality, we have considered the count of an event that represents a not-desired outcome for patients, focusing on the null hypothesis  0 ∶  ≥  0 to select the optimal sample size.The proposed SSD criteria can be similarly derived when the hypotheses are reversed because a "positive" event is considered.In this case, the interest is on testing  0 ∶  ≤  0 versus  1 ∶  >  0 and, when the final analysis is conducted under a frequentist framework,  0 is rejected at level  if   ≥ k , where Instead, if we plan to conduct a Bayesian final analysis, we introduce a Gamma analysis prior distribution for ,   () = gamma(  ,   ), to represent prior knowledge, as previously described, and use it to obtain the posterior distribution of the parameter of interest.Then,  0 is rejected if   ≥ k , where where  is a prespecified small threshold.Hence, the conditional and predictive powers under the two inferential approaches are provided by and for  = , , where   is the fixed design value larger than  0 .Here, the design prior distribution,   () = gamma(;   ,   ), addresses uncertainty on   by assigning a negligible prior probability to values of  smaller than  0 .Given the power functions, by using the conservative criterion which accounts for their sawtooth behavior as  varies, the optimal sample sizes are selected as the ones ensuring that the power will not drop below the desired threshold for any larger sample.

CHOICE OF THE PRIOR DISTRIBUTIONS
A fundamental element that characterizes and distinguishes the different approaches is the possible use of two different Gamma prior distributions, the analysis and the design priors, respectively, introduced to formalize prior information and to represent design expectations.To elicit these prior distributions, we resort to a way of proceeding often used to elicit beta prior densities when testing binary data.The idea is to express the hyperparameters of the priors in terms of () a measure of central location and () a parameter that can be interpreted as the prior sample size.
With the purpose of illustrating the procedure, we focus on   () whose hyperparameters can be fixed as   =     + 1 and   =   , in order to obtain a Gamma prior distribution with prior mode at   and prior sample size   .This latter parameter reflects the dispersion of the distribution around its mode: the larger it is, the more concentrated the Gamma prior is.Hence, we can set the prior mode equal to the clinically relevant design value that we would select under the conditional approach and use   to express the desired degree of uncertainty around it.It is worth noting that, if   → ∞, the prior variance (    + 1)∕(  ) 2 goes to 0 so that the prior density corresponds to the degenerate distribution at   .In this case, no uncertainty is introduced on the design value and, as a consequence, the conditional and predictive approaches lead F I G U R E 2 Design prior distributions that assign different probabilities to the alternative hypothesis (graphs (a1), (a2), and (a3)).Corresponding behavior of the predictive frequentist powers as a function of , when  = 0.05 (graphs (b1), (b2), and (b3)).
to the same optimal sample size, being    () =    () and    () =    ().Of course, it is also possible to choose the prior mean as the measure of centrality of interest: in this case, the hyperparameters are fixed as   =     and   =   .
We have already stressed that the design prior distribution should describe a design scenario that supports values of  under  1 .In addition to the need to deal with a probability of making a correct decision, there is a further reason for this, related to computational aspects due to the limiting behavior of the predictive power functions.In fact, it is possible to prove that the limit of both    () and    () as  → ∞ is given by ℙ   (⋅) ( <  0 ), which is the probability that the design prior assigns to the alternative hypothesis (see Eaton et al., 2013).To show this result empirically, we set  0 = 2 and consider three different design prior distributions for  with the same mode   = 1.6, but different dispersion.More specifically, the probability assigned to the alternative hypothesis by these prior densities is about equal to 1, 0.9, and 0.8, respectively, as it is possible to appreciate in Figure 2 (graphs (a1), (a2), and (a3)).In the same figure (graphs (b1), (b2), and (b3)), we show the corresponding behavior of predictive frequentist powers as a function of  when  = 0.05.As expected, in all the cases considered, the limit that    () approaches as  increases is equal to ℙ   (⋅) ( <  0 ).An analogous behavior can be shown for the Bayesian predictive power.Therefore, if the design prior does not assign a negligible probability to values of  under  0 , the frequentist and Bayesian predictive powers do not approach 1 as the sample size goes to infinity, and we need to bound the threshold  below the limiting value to obtain a finite sample size that satisfies the criterion.The usefulness of avoiding these situations has also been stressed by Lan and Wittes (2012) and Ciarleglio and Arendt (2019).
As regard the choice of the analysis prior distribution, its support and shape depend on the pretrial knowledge we want to incorporate in the final statistical analysis.Differently from the design prior, that must always be a proper distribution in order to have a proper predictive distribution of the data,   () can be chosen as an improper noninformative prior.For instance, the choice   = 1 and   = 0 leads to an improper uniform distribution or we can set   = 1∕2 and   = 0 to obtain the Jeffreys prior.Alternatively, we can employ standard procedures to formalize information from historical data to elicit expert knowledge or to construct archetypal prior distributions to express prior skepticism or enthusiasm about the new treatment efficacy.In these latter cases, it can be useful to express   and   in terms of prior mode and prior sample size as described for the design prior density.
F I G U R E 3 Left panel: Possible choices of the design prior distribution using method (i) for different values of , when  0 = 2 and   = 1.6.Right panel: Behaviors of the corresponding    () and of    () (case  = 0) as a function of , when  = 0.05.

NUMERICAL RESULTS
In this section, we illustrate the main features of the different SSD criteria based on the conservative selection method that takes into account the sawtooth behavior of the power functions.A case study example is also provided.All computations are performed using the R programming language.

Behavior of the power functions and optimal sample sizes
First, we focus on the hybrid classical Bayesian approach and, therefore, on the power function in (3).As previously stressed, selecting a proper design prior is critical in determining the predictive frequentist power.We consider two possible strategies to ensure that   () assigns a negligible probability to the null hypothesis by exploiting the hyperparameters selection procedure described in Section 3. Specifically, given the prior mode   , we set   so that (i)   () assigns a 0.999 probability to a symmetric interval (  − ,   + ), where  is a nonnegative real number such that   +  ≤  0 ; (ii)   () assigns a 0.999 probability to the alternative hypothesis.
In the left panel of Figure 3, we show three possible design priors obtained by using method (i) for different values of , when  0 = 2 and   = 1.6.The behavior of the corresponding    () as a function of  is represented in the right panel of the figure.The limiting case  → 0, that is,   → +∞, which corresponds to a degenerate design prior to   , is also considered.As previously remarked, in this case    () is equivalent to the conditional frequentist power    ().Clearly, the uncertainty around   increases with , resulting in a smaller   and a more dispersed prior distribution.Accordingly, the predictive frequentist power decreases, so that larger sample sizes are needed to achieve the desired level .For instance, when  = 0.8, the resulting optimal sample sizes are 75, 77, 84, and 93, for  equal to 0, 0.2, 0.3, and 0.4, respectively.
In Figure 4, we show three possible design prior distributions, and the corresponding behaviors of    () as a function of , obtained by selecting   with method (ii) for different   , when  0 = 2.In this case, for a fixed   ,   is selected as the smallest value such that ℙ   (⋅) ( <  0 ) is higher than or equal to 0.999.As a result, the larger the difference between the prior mode   and  0 , the lower both the   and the degree of concentration of the design prior distribution required to satisfy the condition regarding ℙ   (⋅) ( <  0 ).As   approaches  0 , the prior design scenario considered is less optimistic and the predictive frequentist power decreases, yielding to larger optimal sample sizes.More specifically, when  = 0.8, the optimal values of    are 61, 93, and 168 for   equal to 1.7, 1.6, and 1.5, respectively.Additional results about the optimal sample sizes according to the predictive frequentist criterion are provided in the Supporting Information to this article.
We now focus on the exact calculations of the sample size based on the Bayesian power functions in ( 5) and ( 6).In the right panel of Figure 5, we show the behavior of    () as a function of  for different choices of   (), when  0 = 2,   = 1.6, and  = 0.05.More specifically, we consider three weakly informative analysis prior distributions that express different prior beliefs towards the treatment efficacy and are shown in the left panel of Figure 5.They are obtained by fixing the prior mode   and by determining the prior sample size   to ensure that the prior probability assigned to the alternative hypothesis, ℙ   (⋅) ( <  0 ), is equal to a prespecified level.The levels considered are 07, 0.4, and 0.1, for prior modes equal to 1, 2, and 3, respectively.Clearly, the greater   , the stronger the prior skepticism expressed.As expected,    () rises more slowly as the skepticism increases and the gap is more evident for small sample sizes because as  increases, the prior information becomes less influential.However, it still impacts the optimal sample sizes    at the level  = 0.8, which are 69, 75, and 86, respectively.
To evaluate how the concentration of the analysis prior distribution around its prior mode affects the selection of the sample size, in Figure 6 we plot the behavior of    as a function of   for different values of   , when  0 = 2,   = 1.6,  = 0.05, and  = 0.8.In the left panel of the figure, we consider values of   larger than  0 and therefore   () expresses increasing skepticism about the treatment effect as   increases, whereas in the right panel the analysis prior distributions considered express more enthusiasm as   increases since the specified prior modes are smaller than  0 .In both the panels, the dashed horizontal line corresponds to the optimal sample size obtained when   → 0: whatever the value of   is, this value coincides with    , that is the sample size selected under the conditional frequentist approach since the analysis prior introduces no information.As it is shown in the left panel of Figure 6, when   >  0 ,    assumes values greater than    for   > 0 and grows monotonically with   , as a consequence of the higher degree of skepticism represented by   ().Moreover, as   increases,    results to be uniformly larger for any value of   .The opposite situation occurs when   <  0 as we can see from the right panel of Figure 6:    is below    for   > 0, decreases as   moves away from 0 and assumes smaller values if the prior mode   decreases.More specifically, we can note that, when   approaches 0,    drops rapidly and reaches 0. This happens when, given the high degree of optimism expressed by the analysis prior distribution, the conditional Bayesian power is uniformly above the desired threshold  = 0.8 for any sample size.Additional computations about the predictive Bayesian approach are available in the online Supporting Information.These results confirm the tendencies previously observed and show that the Bayesian predictive power can be interpreted as a generalized power function which contains the other three as specific cases.

A case study example
Primary immunodeficiency disorders are a group of heterogeneous conditions due to immune system malfunctions.As a result, patients affected by them may suffer from recurrent bacterial infections.A well-established replacement therapy, especially for primary humoral immunodeficiency, consists of regular administrations of polyclonal immune globulin preparations of human origin, such as the IGIV (i.e., immune globulin intravenous).In a related Guidance for Industry (2008), FDA recommends assessing the efficacy of investigational IGIV products in open-label, historically controlled single-arm trials.More specifically, the trial should provide a statistical demonstration that the annual rate of severe bacterial infections per patient (to avoid seasonal bias) is less than 1.The sample size should ensure at least 80% power with one-sided hypothesis testing based on a Type I error rate equal to 0.01.The FDA also underlines that the estimated rate for patients receiving routine IGIV transfusions is less than 0.5 per year against a historical rate of 4 or more infections per year before treatment.Examples of applications of this protocol may be found in Wasserman et al. (2011), Stein et al. (2009), and Hand et al. (2016), who assume that the number of infections is a Poisson distributed variable.Following these guidelines, we can size the single-arm trial according to    () by setting  0 = 1,   = 0.5,  = 0.01, and  = 0.8.The corresponding optimal sample size is    = 34.Alternatively, since the design value is an estimate based on historical data, we may consider the hybrid classic-Bayesian approach to account for uncertainty on it.By exploiting method (ii), a proper design prior centered in   = 0.5 is   () = gamma(|17.99,33.98) and the corresponding optimal sample size is    = 46.Moreover, we may consider the fully Bayesian approaches.Let us suppose that there is some skepticism towards the novel preparation efficacy.This attitude can be incorporated in the SSD procedure, for instance, by considering the analysis prior   () = gamma(|5, 1), which is weakly informative (  = 1) and centered on the historical rate of the nontreated   = 4.We set  = 0.01 to ensure comparability with the frequentist results.Then, the corresponding optimal sample sizes at level  = 0.8 are    = 45 if we consider the conditional approach and    = 63 for the predictive one.

IMPLEMENTATION
To provide a user-friendly and interactive way to apply the methodologies described in the article, we have implemented an R Shiny App that is available at the link https://susanna-gentile.shinyapps.io/Poisson_SSD/.The app allows to compute the optimal sample sizes according to the four power functions, when the focus is on the count of "negative" ( 0 ∶  ≥  0 ) or "positive" ( 0 ∶  ≤  0 ) events.Moreover, it is possible to use the conservative criterion, which takes into account the saw-toothed behavior of the power functions or the standard one.Furthermore,

F
Left panel: Possible choices of the design prior distribution using method (ii) for different values of   when  0 = 2. Right panel: Behavior of the corresponding    () as a function of , when  = 0.05.F I G U R E 5 Left panel: Possible choices of the analysis prior distribution when  0 = 2. Right panel: Behaviors of the corresponding    () as a function of , when  = 0.05.

F
Behavior of    at level  = 0.8 as a function of   when   () expresses skepticism (left panel) or enthusiasm (right panel) towards the treatment efficacy.