checkMonoEmax {clinDR} | R Documentation |
Bayes posterior predictive test for Emax (monotone) model fit
Description
Bayes posterior predictive test for an Emax (monotone) model
fit comparing the best response from lower doses to
the response from the highest dose. checkMonoEmax
is deprecated.
See bpchkMonoEmax
.
Usage
checkMonoEmax(y,
dose,
parm,
sigma2,
nvec=rep(1,length(dose)),
xbase=NULL,
modelFun=emaxfun,
trend='positive',
binary= FALSE,logit=binary)
Arguments
y |
Outcomes. Continuous |
dose |
Doses corresponding to outcomes |
parm |
Matrix of simultated parameter values (each row is a
simulated parameter vector). The |
sigma2 |
Simulated draws from the residual variance (assumed
additive, homogeneous). The length of |
nvec |
The number of observations contributing to each |
xbase |
Optional covariates matching |
modelFun |
The mean model function. The first argument is a
scalar dose, and the second argument is a matrix of parameter values.
The rows of the matrix are random draws of parameter vectors for the
model. The default function is the 4-parameter Emax function |
trend |
The default is 'positive', so high values for lower doses
yield small Bayesian predictive probabilities. Set |
binary |
If TRUE, the inverse logit transform is applied to the (Emax) function output for comparison to dose group sample proportions, and the predictive data are sampled from a binomial distribution. |
logit |
|
Details
A sample of parameters from the joint posterior distribution must be supplied (typically produced by an MCMC program). The Bayesian predictive p-value is the posterior probability that a dose group sample mean in a new study with the same sample sizes would yield a higher (or lower for negative trend) difference for one of the lower doses versus the highest dose than was actually obtained from the real sample. There must be at least two non-placebo dose groups (NA returned otherwise). Placebo response is excluded from the comparisons.
The function generates random numbers, so the random number generator/seed must be set before the function is called for exact reproducibility.
Value
Returns a scalar Bayesian predictive p-value.
Author(s)
Neal Thomas
See Also
plot.plotB
, plotD
, plot.fitEmax
Examples
## Not run:
data("metaData")
exdat<-metaData[metaData$taid==6 & metaData$poptype==1,]
prior<-emaxPrior.control(epmu=0,epsca=10,difTargetmu=0,difTargetsca=10,dTarget=80.0,
p50=3.75,sigmalow=0.01,sigmaup=20)
mcmc<-mcmc.control(chains=3)
msSat<-sum((exdat$sampsize-1)*(exdat$sd)^2)/(sum(exdat$sampsize)-length(exdat$sampsize))
fitout<-fitEmaxB(exdat$rslt,exdat$dose,prior,modType=4,
count=exdat$sampsize,msSat=msSat,mcmc=mcmc)
parms<-coef(fitout)[,1:4] #use first intercept
checkMonoEmax(y=exdat$rslt, dose=exdat$dose, parm=parms, sigma2=(sigma(fitout))^2,
nvec=exdat$sampsize, trend='negative')
## End(Not run)