We have a revised WinBugs code that implements Martin Mcintosh's original
hierarchical Baysian model for control rate meta-regression. I am indebted
to David Spiegelhalter, not only
for the base code for the model, but also for his advice and kind patience
as I struggled to understand the
basic concepts and work my way through to the final model. I am also
indebted to Martin McIntosh for his
instructive insights that helped me reconcile David's code with the model he
proposed in his original article
(Stat in Med, 15, 1713-1728 (1996)). The new code defines theta.t[i] as
the odds ratio and not logit(pc[i]).
It also offers two different approaches to representing the control rate.
The first approach uses the observed
control rate alpha.r[i], which Martin choose in his original article. The
second approach uses the logit(pc[i]).
The WinBugs's code allows us to use an exact binominal rather than the
normal approximation used by Martin
in his original article. Results for both approaches, based on 5000
iterations following a burn-in of 2000 interations,
are given below. I should also note that the data are based on the 13
beta-mimetic trials used by McIntosh in his
1996 article which excluded the Mariona trial.
Parmeter Mcintosh's Original WinBugs with alpha.r WinBugs
with theta.r
mu.t -1.16 -1.17
-0.70) -1.21 (-1.96,-0.68)
beta -1.78 -1.71 (-4.72,
-0.34 (-1.25, 1.00)
The revised WinBugs code is:
{
for(i in 1:k) {
alpha.r[i]<-rc[i]/nc[i];
alpha.t[i]<-rt[i]/nt[i];
rc[i]~dbin(pc[i],nc[i]);
rt[i]~dbin(pt[i],nt[i]);
logit(pc[i])<-theta.r[i];
logit(pt[i])<-theta.r[i]+theta.t[i];
theta.r[i]~dnorm(mu.r, tau.r);
theta.t[i]~dnorm(Y.t[i],tau.t);
# Select one of the following models;
# Y.t[i]<-mu.t + beta*(alpha.r[i]-mean(pc[])); # Mcintosh's model with
observed control rate;
# Y.t[i]<-mu.t + beta*(theta.r[i]-mu.r); # Alternative model
regressed onto logit control rate;
}
# PRIORS
mu.r~dnorm(0.0,1.0E-6);
mu.t~dnorm(0.0,1.0E-6);
beta~dnorm(0.0,1.0E-6);
tau.r~dgamma(1.0E-3,1.0E-3);
tau.t~dgamma(1.0E-3,1.0E-3);
sigma.r<-1/sqrt(tau.r);
sigma.t<-1/sqrt(tau.t);
}
data beta-mimtics
list(rt=c(0,6,0,2,6,2,0,5,4,1,6,15,11),
nt=c(14,14,12,16,19,15,15,19,37,15,33,54,131),
rc=c(6,11,8,3,11,2,10,16,9,5,15,25,6),
nc=c(16,15,13,15,19,18,15,50,39,17,30,52,45),
k=13)
inits
list(tau.r=1,
tau.t=1,mu.t=0,mu.r=0,beta=0,mu.t=0,theta.r=c(0,0,0,0,0,0,0,0,0,0,0,0,0)
,theta.t=c(0,0,0,0,0,0,0,0,0,0,0,0,0))
Cheers!
John Cornell.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|