Last chance! 50% off unlimited learning
Sale ends in
calcBayesEst(data, models, prior, bnds = getBnds(mD = max(data$dose)),
weights = NULL, numPar = c(100, 1597), meanInd = TRUE,
clinRel, scal = NULL, off = NULL)
MCPMod
function). Note that for
this function only the models "linear", "linlog", "emax",
"exponential", "logistic" and "betaMod" are allowed.getBnds
for details)meanInd = TRUE
) or
the posterior mode (meanInd = FALSE
) should be
calculates. See Details for more informationbeta
modellinlog
modelweights
, which contains the calculated model probabilities. In
addition there is an attribute existsMED
containing a logical vector
indicating, whether the MED estimate exists for the given
dose-response parameter estimates.meanInd = FALSE
, the code finds the mode of the marginal distribution of
the non-linear parameters. Then it calculates the posterior mode of the
linear parameters given the mode of the non-linear parameters.O'Hagan, A. and Forster, J. (2006) Kendall's Advanced Theory of Statistics 2B: Bayesian Inference, 2nd edition, Arnold, London
# example 1
doses <- c(0, 62.5, 125, 250, 500)
mods <- list(emax = 25, linear = NULL, logistic = c(50, 50), betaMod = c(1, 1))
clinRel <- 200
d <- 4
prior <- list(a=350^2*(d+2), d=d, m=c(60,280), V=matrix(c(100000,0,0,100000),2,2), S=10)
dats <- genDFdata("emax", c(e0 = 60, eMax = 294, ed50 = 25), doses, rep(46, 5), 350)
# calculate posterior means
calcBayesEst(dats, mods, prior, weights = rep(1/4, 4), clinRel = clinRel, scal=600)
# calculate posterior mode
calcBayesEst(dats, mods, prior, weights = rep(1/4, 4), clinRel =
clinRel, scal=600, meanInd = FALSE)
# example 2 (investigate under different prior scenarios)
s2 <- 1
models <- list(emax = c(7.5), logistic = matrix(c(30,60,4,11), nrow=2),
betaMod=c(1,1))
data <- genDFdata("emax", c(e0 = 0, eMax = 1, ed50 = 7.5), c(0, 10, 37.5, 75),
n=(280/4), sigma=sqrt(s2))
priorProp <- list(S=3, a = s2*6, d = 4, m = c(0, 1), V = c(10,0,0,10))
priorAlt1 <- list(S=3, a = s2*6, d = 4, m = c(-0.5, 1.2), V = c(10,0,0,10))
priorAlt2 <- list(S=3, a = s2*6, d = 4, m = c(0, 1), V = c(1000,0,0,1000))
priorAlt3 <- list(S=3, a = s2*60, d = 40, m = c(0, 1), V = c(40,0,0,40))
priorAlt4 <- list(S=20, a = s2*60, d = 40, m = c(0, 1), V = c(40,0,0,40))
calcBayesEst(data, models, prior = priorProp, clinRel = 0.5, scal = 100,
meanInd = FALSE)
calcBayesEst(data, models, prior = priorAlt1, clinRel = 0.5, scal = 100,
meanInd = FALSE)
calcBayesEst(data, models, prior = priorAlt2, clinRel = 0.5, scal = 100,
meanInd = FALSE)
calcBayesEst(data, models, prior = priorAlt3, clinRel = 0.5, scal = 100,
meanInd = FALSE)
calcBayesEst(data, models, prior = priorAlt4, clinRel = 0.5, scal = 100,
meanInd = FALSE)
Run the code above in your browser using DataLab