PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2....

17
ROBUST BAYESIAN PRIORS IN CLINICAL TRIALS: AN R PACKAGE FOR PRACTITIONERS Jairo Alberto F ´ UQUENE 1 ABSTRACT: The usual Bayesian approach in Clinical Trials for binary data is Beta/Binomial conjugate analysis or a Normal approximation to the log-odds and a conjugate Normal prior. In this conjugate analysis the influence of the prior distribution could be dominant even when prior and data are in conflict. F´ uquene, Cook and Pericchi (2008) make a comprehensive proposal putting forward robust, heavy-tailed Cauchy and Berger’s priors over conjugate priors with the same location and scale than the previous analysis. The behavior of Robust Bayesian methods is qualitative different than Conjugate and short tailed Bayesian methods and arguably much more reasonable and acceptable to the practitioner and regulatory agencies like the FDA (Food and Drug Administration). This work shows the new methodology of Robust Priors in an R package named ClinicalRobustPriors for practitioners of Clinical Trials. This package is useful to compute the distributions (prior, likelihood and posterior) and moments of the robust models: Cauchy/Binomial, Cauchy/Normal and Berger/Normal. Both, Binomial and Normal Likelihoods can be handled by the software. Furthermore, the assessment of the hyperparameters and the posterior analysis can be processed. The utility of the ClinicalRobustPriors package is shown in two examples based in the textbook of Spiegelhalter, Abrams and Myles (2004). KEYWORDS: Clinical trials; ClinicalRobustPriors package; R; robust Bayesian models. 1 Introduction In clinical trials Binary data are ubiquitous. The usual approach is the application of “Linear Bayesian Methods” which are based on Conjugate Priors like the Beta/Binomial (B/B) and Normal/Normal (N/N) conjugate posterior models 1 Institute of Statistics, School of Business Administration, University of Puerto Rico, ıo Piedras Campus. PO Box 23332, San Juan, Puerto Rico 00931-3332, USA. E-mail: [email protected] Rev. Bras. Biom., S˜ ao Paulo, v.27, n.4, p.627-643, 2009 627

Transcript of PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2....

Page 1: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

ROBUST BAYESIAN PRIORS IN CLINICAL TRIALS: AN RPACKAGE FOR PRACTITIONERS

Jairo Alberto FUQUENE1

ABSTRACT: The usual Bayesian approach in Clinical Trials for binary data is

Beta/Binomial conjugate analysis or a Normal approximation to the log-odds and a

conjugate Normal prior. In this conjugate analysis the influence of the prior distribution

could be dominant even when prior and data are in conflict. Fuquene, Cook and Pericchi

(2008) make a comprehensive proposal putting forward robust, heavy-tailed Cauchy

and Berger’s priors over conjugate priors with the same location and scale than the

previous analysis. The behavior of Robust Bayesian methods is qualitative different

than Conjugate and short tailed Bayesian methods and arguably much more reasonable

and acceptable to the practitioner and regulatory agencies like the FDA (Food and

Drug Administration). This work shows the new methodology of Robust Priors in an R

package named ClinicalRobustPriors for practitioners of Clinical Trials. This package is

useful to compute the distributions (prior, likelihood and posterior) and moments of the

robust models: Cauchy/Binomial, Cauchy/Normal and Berger/Normal. Both, Binomial

and Normal Likelihoods can be handled by the software. Furthermore, the assessment

of the hyperparameters and the posterior analysis can be processed. The utility of

the ClinicalRobustPriors package is shown in two examples based in the textbook of

Spiegelhalter, Abrams and Myles (2004).

KEYWORDS: Clinical trials; ClinicalRobustPriors package; R; robust Bayesian models.

1 Introduction

In clinical trials Binary data are ubiquitous. The usual approach is theapplication of “Linear Bayesian Methods” which are based on Conjugate Priors likethe Beta/Binomial (B/B) and Normal/Normal (N/N) conjugate posterior models

1Institute of Statistics, School of Business Administration, University of Puerto Rico, Rıo

Piedras Campus. PO Box 23332, San Juan, Puerto Rico 00931-3332, USA. E-mail:

[email protected]

Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009 627

Page 2: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

(Spiegelhalter, Abrams and Myles (2004)). The conjugate analysis is perceivedto be simpler computationally, however such analysis is not robust with respectto the prior, i.e. changing the prior may affect the conclusions with “unboundedinfluence”. In other words, conjugate priors may lead to a “dogmatic” analysiswhen prior and likelihood are not on equal footing (i.e prior and likelihood are inconflict). The posterior mean of the parameter mean in the N/N and B/B modelsis µn = (n0 +n)−1(n0µ+nXn). It is clear that the mean is a convex combination ofthe prior expectation, µ, and the data mean, Xn, and thus the prior has unboundedinfluence. For example, as the locations prior/data conflict the difference betweenprior expectation and the data mean grows, does so the difference between priorexpectation and the posterior expectation and without bound (For more generalmeasures of prior-sample conflict see for example Evans and Moshonov (2006)).

On the other hand Fuquene, Cook and Pericchi (2008) consider non-conjugatemodels with heavy-tailed priors for Bayesian analysis of clinical trials. Withheavy-tailed priors the prior is discounted automatically when there are conflictsbetween prior information and data. These authors show that the popular conjugateanalysis could be exposed as non-robust. The first proposal in Fuquene, Cookand Pericchi (2008) is an analysis based on the Cauchy Prior for the naturalparameter in Exponential Families showing the robustness of the Cauchy prior withthe same location and scale that the previous analysis in the Cauchy/Binomial(C/B) and Cauchy/Normal (C/N) posterior models for the Log-Odds scale. ForC/B and C/N models the posterior moments are calculated with rejection methodand the approximations of Pericchi and Smith (1992) respectively. The traditionalapproach Conjugate Analysis is applied in clinical trials for the “advantage” ofclosed form results leading to non-robust Bayesian analysis. Hence the secondproposal in Fuquene, Cook and Pericchi (2008) is an analysis with a Robust Prior(called “Berger’s Prior”) originally developed by J. O. Berger in the textbook ofBerger (1985). Berger’s Prior gives a closed form solution when is coupled with aNormal Log-Odds likelihood. These non-conjugate analysis are more robust thanthe traditional conjugate analysis, because if there is conflict between current dataand past data, the past is discounted. In other words, C/B, C/N and Berger/Normal(B/N) non-conjugate posterior models are more robust than the B/B and N/Nconjugate posterior models due to the diminishing influence of the prior as a functionof the conflict between prior and data.

The aim of this paper is to present the R (R Development Core Team 2009)package named ClinicalRobustPriors, available from the Comprehensive R ArchiveNetwork at <http://CRAN.R-project.org/package=ClinicalRobustPriors>, whichcan be used to compute the posterior distribution and posterior moments of C/B,C/N and B/N posterior models. The major goal is to demonstrate the way inwhich the users can perform Robust Bayesian Analysis for clinical trials with theClinicalRobustPriors package. The ClinicalRobustPriors package is also useful tocompute the traditional conjugate analysis. Furthermore, the assessment of thehyperparameters and the posterior analysis is processed in different scales of thedata. The paper proceeds as follows: in Section 2, a background of the C/B, C/N

628 Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009

Page 3: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

and B/N posterior models and methods that the ClinicalRobustPriors package usesto calculate the posterior moments are given. Section 3 shows a description of thefunctions of the ClinicalRobustPriors package is shown. In Section 4, how to applythese functions is shown using illustrative examples adapted from Spiegelhalter,Abrams and Myles (2004) and conclusions are drawn.

2 The conjugate Cauchy and Berger’s priors for binomial

and normal likelihoods

This section starts with two important likelihoods for clinical trials presentedin Spiegelhalter, Abrams and Myles (2004). First it considers the Binomiallikelihood. It is striking that for the Binomial likelihood no clear result previouslyknown in Bayesian robustness applies: the natural parameter is not a locationparameter, and the regularity conditions required for exponential family do nothold here, Dawid (1973), O’Hagan (1979) and Pericchi, Sanso and Smith (1993).However, Fuquene, Cook and Pericchi (2008) present a new theorem: “PolynomialTails Comparison Theorem.” which establishes the analytical behavior of anylikelihood function with tails bounded by a polynomial using priors with polynomialtails, such as Cauchy or Student’s t. The Binomial likelihood can be handled as adirect corollary of the result leading to the robustness of the C/B model. Next, itexamines the ubiquitous and ever-important normal model. More is known aboutBayesian robustness for the Normal likelihood with Cauchy or Berger’s priors (seeBerger (1985) or Pericchi and Smith (1992)). The contributions given in Fuquene,Cook and Pericchi (2008) complement the previous results.

2.1 Binomial likelihood

Suppose that X1, . . . ,Xn is a random sample of size n from aBernoulli(θ) distribution, where θ is unknown (0 < θ < 1). WithX+ =

∑ni=1 Xi ∼ Binomial(n, θ) the number of success in n trials. The Binomial

likelihood in the exponential family form is:

f(X+|λ) ∝ exp{

X+λ − n log(1 + eλ)}

, (1)

where the natural parameter is the Log-Odds λ = log(θ/(1−θ)), with −∞ < λ < ∞.Suppose also that the prior distribution of θ, π(θ), is a Beta(a, b) distribution withparameters a and b (a > 0 and b > 0),

π(θ) =Γ(a + b)

Γ(a)Γ(b)θa−1(1 − θ)b−1; 0 < θ < 1. (2)

Fuquene, Cook and Pericchi (2008) first perform a conjugate analysis andexpress the Beta(a, b) prior in terms of the Log-Odds, after of the change of variableλ = log(θ/(1 − θ)), as follows:

Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009 629

Page 4: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

πB(λ) =Γ(a + b)

Γ(a)Γ(b)

(

1 + eλ

)a−1 (

1

1 + eλ

)b−1 ∣

(1 + eλ)2

(3)

=Γ(a + b)

Γ(a)Γ(b)

(

1 + eλ

)a (

1

1 + eλ

)b

, (4)

and the expectation and variance for the Beta prior are

EB(λ) = Ψ(a) − Ψ(b); VB(λ) = Ψ′

(a) + Ψ′

(b), (5)

where Ψ(·) is Digamma function and Ψ′

(·) is Trigamma function, tabulated inAbramowitz and Stegun (1970). The posterior distribution, expectation andvariance of B/B model are known in closed form (Fuquene, Cook and Pericchi(2008))

πBB(λ | X+) =Γ(n + a + b) exp

{

(a + X+)λ − (n + a + b) log(1 + eλ)}

Γ(X+ + a)Γ(n − X+ + b), (6)

An important term in this paper is “The posterior mean is robust with respectto the prior” which can be explained with the following definition:

Definition 2.1. Let λ be a random variable with prior distribution, π(λ), withlocation parameter µ. The posterior mean is robust with respect to the prior, if andonly if, the posterior mean remains bounded as µ → +∞ or µ → −∞. That is, theposterior mean is robust if there exists a constant M such that −M < E(θ|y) < M .

If the posterior mean is robust with respect to the prior, the prior has“unbounded influence” about the posterior expectation. The posterior expectationand posterior variance of the B/B model are

EBB(λ|X+) = Ψ(X+ + a) − Ψ(n − X+ + b), (7)

VBB(λ|X+) = Ψ′

(X+ + a) + Ψ′

(n − X+ + b). (8)

Changing the hyperparameters a and b the posterior expectation can bechanged, so EBB(λ|X+) → ∞ as a → ∞ and EBB(λ|X+) → −∞ as b → ∞. Inother words the influence of the prior mean is unbounded. In Fuquene, Cook andPericchi (2008) for robust analysis in Binomial data a Cauchy prior for the naturalparameter λ is used in order to achieve robustness with respect to the prior,

πC(λ) =β

π[β2 + (λ − α)2], (9)

with parameters of localization and scale α = EBB(λ|X+) and β =√

EBB(λ|X+)respectively (the same parameters of localization and scale than the Beta prior).

630 Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009

Page 5: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

The posterior distribution of the C/B model is

πCB(λ | X+) =exp

{

X+λ − n log(1 + eλ) − log(

β2 + (λ − α)2)}

m(X+),

where m(X+) is the predictive marginal. Notice that this posterior alsobelongs to the exponential family.

In order to prove the robustness of the Cauchy prior coupled with a binomiallikelihood, Fuquene, Cook and Pericchi (2009) propose a general result that onlyrequires a bound in the tail behavior of the likelihood. The meaning of this noveltheorem is that under the conditions of it, when the prior and the model are inconflict, the prior acts as a noninformative uniform prior. In other words, the priorinfluences the analysis only when prior information and likelihood are in broadagreement.

Now it is shown the Polynomial Tails Comparison Theorem, presented inFuquene, Cook and Pericchi (2008). In order to decide if a Cauchy prior is robustwith respect to a likelihood, the following theorem is useful and easy to apply.

Let f(λ) be any likelihood function such that as |λ| → ∞∫

|λ|>m

f(λ) dλ = O(m−2−ε). (10)

For this paper f is a Binomial or Gaussian likelihood function, but of coursethe result is much more general. Define

c(λ;µ) =b

π(b2 + (λ − µ)2)(11)

for some b > 0. This is the Cauchy PDF with center µ and scale b. Again,the result is easily generalizable for Student-t priors with degrees of freedomν > 1 as long as O(m−2−ε) in (10) is changed to O(m−(ν+1)−ε). For instancethe latter holds for any ν in any likelihood with exponentially decreasing tails.

Denote by πC(λ|data) and πU (λ|data) the posterior densities employing theCauchy and the Uniform prior densities respectively. Applying Bayes rule to bothdensities, yield for any parameter value λ0 the following ratio:

πC(λ0|data)

πU (λ0|data)=

∫ ∞

−∞f(λ) c(λ;µ) dλ

c(λ0;µ)∫ ∞

−∞f(λ) dλ

.

Theorem 2.2. For fixed λ0,

limµ→∞

∫ ∞

−∞f(λ) c(λ;µ) dλ

c(λ0;µ)∫ ∞

−∞f(λ) dλ

= 1. (12)

Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009 631

Page 6: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

Proof: See Fuquene, Cook and Pericchi (2008).In other words, when there is a conflict between prior information and the

sample information, the Cauchy prior effectively becomes a uniform prior, and inthis precise sense the prior information is discounted. Of Theorem 2.1 the posterior

expectation of the C/N model satisfy limα→±∞ EC(λ|X+) ≈ λ + (e2λ − 1)/2neλ

where λ = log((Xn)/(1− Xn)) is the Maximum Likelihood Estimator (MLE) of thenatural parameter (Fuquene, Cook and Pericchi (2008)). The bounded influenceof the posterior expectation of C/B when prior and likelihood are in conflict showthat the use of robust priors leads to a safer and less dogmatic inference.

Fuquene, Cook and Pericchi (2008) use Laplace’s method proposed inTierney, Kass and Kadane (1989) and weighted rejection sampling (see Smith andGelfand (1992)) for the posterior moments of the C/B model. The numerical resultsshowed that for n ≥ 10 the approximations with Laplace’s method are very goodfor a wide range of values of a, b, n, and X+. However if the sample size is small(n < 10) the authors find less success with this approximation (There is scope herefor more elaborate accurate numerical methods that are acceptable for any samplesize). On the other hand, the approximation with rejection sampling was very goodwith either large or small sample sizes. The rejection method proceeds as follows:

1. Calculate M = f(X+|λ).

2. Generate λj ∼ πC(λ).

3. Generate Uj ∼ Uniform(0,1).

4. If MUj πC(λj) < f(X+|λj)πC(λj), accept λj ; otherwise, reject λj . Go tostep 2.

Simulation from the predictive posterior distribution,

f(X | X+) =

f(X|λ)πCB(λ | X+)dλ, (13)

is easy when the simulations from the posterior distribution πCB(λ | X+) are found(see for example Gammerman (1997) or Gelman, Carlin, Stern and Rubin (2004)).For each simulated value of λ from the posterior distribution, one value X from thepredictive distribution f(X|λ), can be obtained.

2.2 Normal likelihood

Pericchi and Smith (1992) showed some aspects of the robustness of theStudent-t prior for a Normal location parameter and applied Taylor’s series toapproximate the posterior moments in the Student-t/Normal model. The Cauchyprior as a student-t with one degree of freedom, can be used for a C/N model.However the Polynomial Tails Comparison Theorem for a Normal Likelihood canbe use. Here the prior conjugate family is the Normal, and again we compare it witha Cauchy prior for the mean. As with a Binomial likelihood, the conjugate prior

632 Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009

Page 7: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

leads to non-robustness with unbounded influence of the prior location. On theother hand, for a Cauchy (or more generally Student-t) prior, as the prior locationand sample mean Xn grow apart, the posterior mean tends to Xn, and the prior isdiscounted. For the posterior expectation of the C/B model we have the followingresult (as a corollary of the Theorem 2.1):

limα→±∞

ECN (λ|Xn) ≈ limα→±∞

Xn − 2σ2(Xn − α)

n(β2) + (Xn − α)2= Xn. (14)

On the other hand, Berger (1985) proposes a robust prior for the comparisonof several means (called in Fuquene, Cook and Pericchi (2008) the “Berger’sprior”) that gives closed form solution when is coupled with a Normal likelihooddistribution. This prior is the following:

πBP (λ) =

∫ 1

0

N(λ|µ;d + b

2ν− d) · 1

2√

νdν (15)

Where N(λ|µ, τ2) denotes a normal density on the parameter λ with meanand variance µ, τ2 respectively, which is well-defined whenever b ≥ d. In the (B/N)model, Xn ∼ Normal(λ, σ2/n), σ2 is assumed known and λ is unknown. Let behere b = β2 (equal to Cauchy’s scale) and d = σ2/n, so the predictive distributionof the B/N model is

m(Xn) =

σ2 + nβ2

√4πn(Xn − µ)2

[

1 − exp

{

−n(Xn − µ)2

σ2 + nβ2

}]

.

The posterior distribution of the B/N model is

πBN (λ|Xn) =

πBP (λ) exp

{

−n(Xn − λ)2

2σ2

}

σ√

σ2 + nβ2

√2n(Xn − µ)2

[

1 − exp

{

−n(Xn − µ)2

σ2 + nβ2

}]

. (16)

The posterior expectation of the B/N model

EBN (λ|Xn) = Xn +2σ2n(Xn − µ)2 − 2σ2(σ2 + nβ2)(f(Xn) − 1)

n(Xn − µ)(σ2 + nβ2)(f(Xn) − 1), (17)

and the posterior variance of the B/N model

VBN (λ|Xn) =σ2

n− σ4

n2

{

4n2(Xn − µ)2f(Xn)

(σ2 + nβ2)2(f(Xn) − 1)2

}

(18)

+σ4

n2

{

2(σ2 + nβ2)(f(Xn) − 1)((σ2 + nβ2)(f(Xn) − 1) − n)

(σ2 + nβ2)2(f(Xn) − 1)2(Xn − µ)2

}

,

where f(Xn) = exp

{

n(Xn − µ)2

σ2 + nβ2

}

.

Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009 633

Page 8: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

The posterior expectation for the B/N model satisfies the following

limµ→±∞

EBN (λ|Xn) = Xn; limµ→Xn

EBN (λ|Xn) = Xn. (19)

For the proof of the results see Berger (1985) or Fuquene, Cook and Pericchi(2008).

3 Description of the R package

Table 1 contains only the description of the functions of the ClinicalRobust-Priors package since more information can be found on R-help.

Table 1 - Functions and description of the ClinicalRobustPriors package

Function DescriptionCauchy.Binomial() Compute the distributions (prior, likelihood, posterior pre-

dictive and posterior) and moments for the Beta/Binomialconjugate model and Cauchy/Binomial robust model. Theplots are processed in Log-Odds and Theta Scale.

Berger.Normal() Compute the distributions (prior, likelihood and posterior)and moments for the Normal/Normal conjugate model andBerger/Normal robust model. The plots are processed inLog-Odds and OR Scale.

Cauchy.Normal() Compute the distributions (prior, likelihood and posterior)and moments for the Normal/Normal conjugate model andCauchy/Normal robust model. The plots are processed inLog-Odds and OR Scale.

Berger’s prior is similar to a Cauchy prior, though thinner in the tails hencethe results with Berger.Normal() and Cauchy.Normal() are very similar. Berger’sprior is superior than a Cauchy when b ≥ d because Berger’s prior yields closedform exact results. In the case b < d Cauchy.Normal() function should be use for arobust estimation since it gives well approximate results. The usages of the threefunctions are described in the following examples:

Example: Cauchy.Binomial()

Cauchy.Binomial(n=15, x=12, a=3, b=12, 40, min.value=-5, max.value=5,iter=10000).

The arguments are:• n: Sample size or number of observed patients.• x: Number of positive responses in n trials.

634 Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009

Page 9: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

• a: The usual parameter of Beta prior and the number of positive responses inthe prior information.

• b: The usual parameter of Beta prior and the number of negative responsesin the prior information.

• m: Number of additional patients for predictions

• min.value: Minimum value in Log-Odds scale for the plots. The defaultmin.value is 5.

• max.value: Maximum value in Log-Odds scale for the plots. The defaultmax.value is -5.

• iter: Number of iterations in rejection sampling for the moments for theCauchy/Binomial model. The default iter is 10000.

Example: Berger.Normal()

Berger.Normal(mu=0, ym=-1.28, tau=0.35, sigma=0.34, n0=32.3, n=35.3,min.value=-2.5, max.value=2, OR.xlim=c(0,3)).

The arguments are:

• n: Sample size or number of observed patients.

• x: Number of positive responses in n trials.

• a: The usual parameter of Beta prior and the number of positive responses inthe prior information.

• b: The usual parameter of Beta prior and the number of negative responsesin the prior information.

• m: Number of additional patients for predictions

• min.value: Minimum value in Log-Odds scale for the plots. The defaultmin.value is 5.

• max.value: Maximum value in Log-Odds scale for the plots. The defaultmax.value is -5.

• iter: Number of iterations in rejection sampling for the moments for theCauchy/Binomial model. The default iter is 10000.

The Berger.Normal() and Cauchy.Normal() function have the samearguments.

4 Examples of application

This section presents the applications of the ClinicalRobustPriors packageadapting two examples considered in Spiegelhalter, Abrams and Myles (2004). Inthe first example C/B and B/B models are compared when prior and likelihood arein conflict and prior and likelihood are consistent. The second example is based ina clinical trial of early thrombolytic therapy that compares anistreplace treatmentand placebo.

Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009 635

Page 10: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

4.1 Example 1: Analysis of response rate with B/B and C/B

Suppose that a drug has a true response rate between 0 and 0.4, with anexpectation around 0.2. Spiegelhalter, Abrams and Myles (2004) recommend totranslate this information into a prior Beta(a, b) assuming a Normal prior, N(µ, τ2),with mean, µ = 0.2, and standard deviation, τ = 0.1. For the Beta distribution,

a = µ(µ(1 − µ)/τ2 − 1) and b = a(1 − µ)/µ (20)

so that θ ∼ Beta(3, 12). Because of the rule for updating beta priors given data,the parameters a and b are sometimes referred to as the number of prior successesand prior failures, respectively. Also, a+b is sometimes referred to as the numberof prior observations and serves as a measure of how informative a prior is. Usingthis terminology in this example the Beta(3, 12) prior contains approximately 15observations.

Prior and Likelihood are in conflict. If the drug is tested on 15 patients(the same number of observations than the Beta prior) and 12 positive responsesare observed, the likelihood of the experiment is X+ ∼ Binomial(15, θ) and theposterior distribution is θ | X+ ∼ Beta(15, 15). Suppose also that it is desired totreat m = 40 additional patients to know the number of positive responses in thesetrials. In ClinicalRobustPriors package with the Cauchy.Binomial() function theresults are shown in Tables 2 and 3 for the prior, likelihood and posterior analysisfor the B/B conjugate and C/B non-conjugate analysis.

Table 2 - Results prior and likelihood information from ClinicalRobustPriorspackage for the example 1: prior and likelihood in conflict

MLE of the Log Odds 1.39

MLE of Theta 0.80

Location of the Beta and Cauchy Priors -1.52

Scale of the Beta and Cauchy Priors 0.69

Figure 1 displays a large discrepancy between the means of the priorinformation and the normalized likelihood of the data (i.e. prior and likelihoodare in conflict). Table 2 shows that the current data information favors the newdrug because the probability of positive responses is 0.8. On the other hand, theprior mean is a/(a + b) = 0.2 hence there is a high discrepancy between prior andcurrent data.

In Table 3 the results for the C/B model are similar to the likelihoodinformation because the posterior expectation and the MLE are closer. The credibleinterval with C/B favors the new drug, in contrast with the B/B model where theprior information has a high weight. The predictive mean with C/B is more related

636 Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009

Page 11: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

Table 3 - Results posterior and predictive analysis from ClinicalRobustPriorspackage for the example 1: prior and likelihood in conflict

Beta/Binomial Cauchy/Binomial

Posterior Expectation in the Log Odds Scale 0.00 1.21

Posterior Standard Deviation in the Log Odds 0.37 0.68

Posterior Expectation in the Theta Scale 0.50 0.77

95% Credible Interval Theta Inf. 0.33 0.47

95% Credible Interval Theta Sup. 0.67 0.93

Predictive Mean for m = 40 20.00 30.00

Predictive sd for m = 40 3.81 5.28

with the sampling data. The results show that when the treatment is applied in40 patients the predictive means of the positive responses with B/B and C/B are20 and 30 respectively. The information with the current data, 0.8 × 40 = 32, isapproximately equal to the C/B model. Figure 1 displays the distributions obtainedwith the ClinicalRobustPriors package. This example illustrate that if the priorand current data information are very different, C/B model is more closer to thenormalized likelihood (i.e. posterior distribution using Uniform prior).

Prior and Likelihood are consistent. Other illustrative example with theClinicalRobustPriors package is the posterior analysis when the means of prior andlikelihood are similar. Suppose now that 6 positive responses are observed, the like-lihood of the experiment is X+ ∼ Binomial(15, θ) and the posterior distribution isθ | X+ ∼ Beta(9, 21). For this example with the Cauchy.Binomial() function theresults are shown in Tables 4 and 5. In Table 4, the prior mean and MLE are similarand both are not favoring the new Drug. Table 5 shows that the results with C/Band B/B are very similar.

This example illustrate that when the responses in the current data andlikelihood are approximately equal, the results with B/B conjugate and C/B non-conjugate are very similar. In other words, the use of robust priors, makes Bayesianresponses adaptive to potential conflicts between current data and previous trials.The Figure 2 displays the similar posterior analysis obtained with the R package.

4.2 Example 2: Bayesian analysis of a clinical trial with the C/B model

The example is adapted from Spiegelhalter, Abrams and Myles (2004) ofNormal Log-Odds coupled with a Normal prior. Alternatively, it is assumed Heavytailed Berger’s prior, with the same location and scale (following the assessment ofBerger (1985)).

Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009 637

Page 12: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

Figure 1 - Figures in ClinicalRobustPriors package for the B/B and C/B posteriormodels for the illustration when prior and likelihood are in conflict.

The randomized controlled trial is to compare anistreplace (a new drugtreatment to be given at home as soon as possible after myocardial infarction)and placebo (conventional treatment). The prior distribution was based on thesceptical opinion of a cardiologist that consider small treatment effects representedby a normal prior with mean log(OR)=0 and with a 95% interval run from 50%reduction in odds of death (OR=0.5, log(OR)=-0.69) to a 100% increase (OR=2,log(OR)=0.69). On a log(OR) scale, this prior has a 95% interval from -0.69to 0.69 and so has a standard deviation 0.69/1.96 = 0.35. This paper uses theNormal approximation for binary data for the Log-Odds with the approximatestandard error recommended in Spiegelhalter, Abrams and Myles (2004) for 2 × 2tables, following their suggestion of an standard error, σ = 2, the prior numberof observations is n0 = 4/0.352 = 32.3. Suppose that the evidence from studyabout 30-day mortality was 40/165 on control and 13/163 on new treatment. Ifthe ratio of the odds of death following the new treatment to the odds of death

638 Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009

Page 13: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

Table 4 - Results prior and likelihood information from ClinicalRobustPriorspackage for the example 1: prior and likelihood are consistent.

MLE of the Log Odds -0.41

MLE of Theta 0.40

Location of the Beta and Cauchy Priors -1.52

Scale of the Beta and Cauchy Priors 0.69

Table 5 - Results posterior and predictive analysis from ClinicalRobustPriorspackage for the example 1: prior and likelihood are consistent

Beta/Binomial Cauchy/Binomial

Posterior Expectation in the Log Odds Scale -0.88 -0.76

Posterior Standard Deviation in the Log Odds 0.41 0.51

Posterior Expectation in the Theta Scale 0.29 0.32

95% Credible Interval Theta Inf. 0.16 0.15

95% Credible Interval Theta Sup. 0.48 0.56

Predictive Mean for m = 40 12.00 13.00

Predictive sd for m = 40 3.49 5.25

on the conventional is OR< 1 then favors the new treatment. The estimatedlog(OR) is Xn = −1.28 (OR=0.28 or 72% risk reduction) with estimated standarderror 0.34 and n = 4/0.342 = 35.3, approximately the same weight of theprior. For the analysis of this clinical trial the Berger.Normal() function, of theClinicalRobustPriors package is used because in this case b ≥ d.

In Table 6 the posterior mean for the N/N model is (n0µ + nXn)/(n0 +n) = −0.67 with standard deviation σ/

√n0 + n = 0.24, the estimated odds ratio is

e−0.67 = 0.51 or 49% risk reduction. For the B/N model the posterior mean is -1.10(e−1.10 = 0.33 or 67% risk reduction) with standard deviation 0.36. In the N/N an95% credible interval on the log(OR) scale corresponds to odds ratios from 0.32 to0.83, or a 95% probability that the true risk reduction lies between 17% and 68%.On the other hand for the B/N posterior model the 95% credible interval show thatthe true risk reduction lies between 32% and 84% and the current data shows a riskreduction between 46% and 86%.

The missing data, N/A, in Table 6 appear because the prior distribution hasno a credible interval. The results with B/N model and the data are similar becausewhen the prior and likelihood information are very different the B/N robust modelgives more weight to the data with the qualitative closed form results. Analysis of

Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009 639

Page 14: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

Table 6 - Results from ClinicalRobustPriors package for the Example 2: Bayesiananalysis of a clinical trial with Sceptical Priors

Prior Normalized/Likelihood Normal/Normal Berger/Normal

Location Log Odds Scale 0.00 -1.28 -0.67 -1.10

Scale 0.35 0.34 0.24 0.36

Location OR Scale 1.00 0.28 0.51 0.33

95% Credible Interval OR Inf. NA 0.14 0.32 0.16

95% Credible Interval OR Sup. NA 0.54 0.83 0.68

Figure 2 - Figures in ClinicalRobustPriors package for the B/B and C/B posteriormodels for the illustration when prior and likelihood are consistent.

clinical trials is one area in which there is typically a substantial amount of priorinformation. This example illustrates that the clinical trials are an ideal settingfor the application of robust priors. Figure 3 is obtained with the Berger.Normal()function and it displays that “in the big discrepancy” between prior and current

640 Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009

Page 15: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

Figure 3 - Figures in ClinicalRobustPriors package for the Example 2: Bayesiananalysis of a clinical trial with Sceptical Priors.

data with the Berger’s Prior the results are very similar to the current data. Inother words the Normal prior is more “dogmatic” than the Berger prior leading tonon-robust results. Bayesian analysis with robust priors is superior in importantways than analysis with conjugate and light-tailed in clinical trials.

Acknowledgments

Thanks to Brenda Betancourt Canizales for helpful comments and severalsuggestions. The author was supported by Institute of Statistics, School of BusinessAdministration, UPR-RRP.

FUQUENE, J. A. Priores Bayesianas robustas em ensaios clınicos: um pacote de Rpara os profissionais Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009.

Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009 641

Page 16: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

RESUMO: Neste trabalho e considerado um novo pacote R baseado na metodologia

apresentado por Fuquene, Cook and Pericchi (2008) para modelos Bayesianos robustos

em ensaios clınicos. Este pacote disponibiliza as distribuicoes e momentos do modelos

robustos: Cauchy/Binomial, Cauchy/Normal e Berger/Normal. E mostrada a utilidade

de pacote R em dois exemplos fundados no livro do Spiegelhalter, Abrams and Myles

(2004).

PALAVRAS-CHAVE: Ensaios clınicos; pacote R; modelos Bayesianos robustos.

References

ABRAMOWITZ, M; STEGUN, I. Handbook of Mathematical Functions. NationalBureau of Standards, vol. 46, Applied Mathematics Series, 1970.

BERGER, J. O. Statistical decision theory and Bayesian analysis. 2nd. ed. Springer-Verlag, 1985.

DAWID, A. P. Posterior expectations for large observations. Biometrika, London,v.60, p.664–667, 1973.

EVANS, M; MOSHONOV, H. Checking for prior-data conflict. Bayesian Anal., v.1,p.893-914, 2006.

FUQUENE, J.; COOK, J; PERICCHI L. R. A case for robust bayesian priorswith applications to binary clinical trials. The Berkeley Electronic Press, UT MDAnderson Cancer Center Department of Biostatistics Working Paper Series. 2008.Working Paper 44.

GAMMERMAN, D. Markov chain Monte Carlo: stochastic simulation for Bayesianinference. London: Chapman & Hall/CRC, 1997.

GELMAN, A; CARLIN, J. B.; STERN, H.; RUBIN, D. Bayesian data analysis.2nd. ed., New York: Chapman & Hall/CRC, 2004.

O’HAGAN, A. On outlier rejection phenomena in bayes inference. J. R. Stat. Soc.

B, London, v.41, p.358–367, 1979.

PERICCHI, L. R.; SANSO, B.; SMITH, A. F. M. Posterior cumulant relationshipsin bayesian inference involving the exponential family. J. Am. Stat. Assoc., NewYork, v.88, p.1419–1426, 1993.

PERICCHI, L. R.; SMITH, A. F. M. Exact and approximate posterior moments fora normal localization parameter. J. R. Stat. Soc., London, v.54, p.793–804, 1992

R DEVELOPMENT CORE TEAM 2009, R: A Language and Environment for

Statistical Computing, R Foundation for Statistical Computing. Vienna. Disponıvelem: ¡http://www.R-project.org¿.

SMITH, A. F. M.; GELFAND, A. E. Bayesian statistics without tears: Asamplingresampling perspective. Am. Stat., Washington, v.46, p.84–88, 1992.

642 Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009

Page 17: PACKAGE FOR PRACTITIONERSjaguar.fcav.unesp.br/RME/fasciculos/v27/v27_n4/A8_Jairo.pdf · 2010. 2. 3. · to calculate the posterior moments are given. Section 3 shows a description

SPIEGELHALTER, D. J.; ABRAMS, K. R.; MYLES, J. P. Bayesian approaches

to clinical trials and health-care evaluation. London: Wiley, 2004.

TIERNEY, L; KASS, R. E.; KADANE, J. B. Fully exponential laplaceapproximations to expectations and variances of nonpositive functions. J. Am. Stat.

Assoc., New York, v.84, p.710-716, 1989.

Received in 21.07.2009.

Approved after revised in 11.11.2009.

Rev. Bras. Biom., Sao Paulo, v.27, n.4, p.627-643, 2009 643