fitEmaxB {clinDR}  R Documentation 
Uses Rpackage rstan
to fit a Bayesian hyperbolic or sigmoidal
Emax model. Different intercepts for multiple protocoldata are supported. For binary
data, the Emax model is on the logit scale.
fitEmaxB(y, dose, prior, modType = 4, prot = rep(1, length(y)),
count = rep(1, length(y)), xbase=NULL,
binary = FALSE, msSat = NULL,
pboAdj = FALSE, mcmc = mcmc.control(), estan = NULL,
diagnostics = FALSE, nproc = getOption("mc.cores", 1L))
y 
Outcome for each patient. Missing 
dose 
Dose for each patient. 
prior 
Prior specification through an object of type 'emaxPrior' or 'prior'.
See 
modType 
modType=3 (default) for the 3parameter hyperbolic Emax model. modType=4 for the 4parameter sigmoidal Emax model. 
prot 
Protocol (group) membership used to create multiple intercepts. The default is a single protocol. The prior disribution for the placebo response is reused independently for each intercept. 
count 
Counts for the number of patients when the 
xbase 
A matrix of baseline covariates with rows corresponding to

binary 
When 
msSat 
If continuous 
pboAdj 
For published data with only pboadjusted dose group means and
SEs, the model is fit without an intercept(s). If initial parameters
are supplied, the intercept (E0) should be assigned 
mcmc 
Inputs controlling 
estan 
The compiled 
diagnostics 
Printed output from rstan. See 
nproc 
The number of processor requested for 
The function compileStanModels
must be executed once to create compiled STAN
code before fitEmaxB
can be used.
MCMC fit of a Bayesian hyperbolic or sigmoidal Emax model. The prior distributions available are based on the publication Thomas, Sweeney, and Somayaji (2014) and Thomas and Roy (2016).
The posterior distributions are complex because the distributions of the Emax
and ED50
parameters
change substantially as a function of the lambda
, often
creating 'funnel' type conditions. Small numbers of
divergences are common and do not appear easily avoided.
Extensive simulation using evaluations with emaxsimB
support the utility of the resulting approximate
posterior distributions. The number of divergences can be
viewed using diagnostics=TRUE
. The usual convergence
diagnostics should always be checked.
A list assigned class "fitEmaxB" with:
estanfit 
The 
y, dose, prot, count,
modType, binary, pboAdj, nbase,
msSat, prior, mcmc 
Input values. 
The default modType was changed from 3 to 4 for clinDR version >2.0
Neal Thomas
Thomas, N., Sweeney, K., and Somayaji, V. (2014). Metaanalysis of clinical dose response in a large drug development portfolio, Statistics in Biopharmaceutical Research, Vol. 6, No.4, 302317. <doi:10.1080/19466315.2014.924876>
Thomas, N., and Roy, D. (2016). Analysis of clinical doseresponse in smallmolecule drug development: 20092014. Statistics in Biopharmaceutical Research, Vol. 6, No.4, 302317 <doi:10.1080/19466315.2016.1256229>
fitEmax
, predict.fitEmaxB
, plot.fitEmaxB
, coef.fitEmaxB
## Not run:
data("metaData")
exdat<metaData[metaData$taid==1,]
prior<emaxPrior.control(epmu=0,epsca=4,difTargetmu=0,difTargetsca=4,dTarget=20,
p50=(2+5)/2,
sigmalow=0.01,sigmaup=3)
mcmc<mcmc.control(chains=3)
msSat<sum((exdat$sampsize1)*(exdat$sd)^2)/(sum(exdat$sampsize)length(exdat$sampsize))
fitout<fitEmaxB(exdat$rslt,exdat$dose,prior,modType=4,prot=exdat$protid,
count=exdat$sampsize,msSat=msSat,mcmc=mcmc)
plot(fitout)
## End(Not run)