When we have the dual endpoint model, also the dosebiomarker fit is shown in the plot
1 2 3 
x 
the 
y 
the 
data 
the 
extrapolate 
should the biomarker fit be extrapolated to the whole dose grid? (default) 
showLegend 
should the legend be shown? (not default) 
... 
additional arguments for the parent method

This returns the ggplot
object with the dosetoxicity and dosebiomarker model fits
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31  # Create some data
data < DataDual(
x=c(0.1, 0.5, 1.5, 3, 6, 10, 10, 10,
20, 20, 20, 40, 40, 40, 50, 50, 50),
y=c(0, 0, 0, 0, 0, 0, 1, 0,
0, 1, 1, 0, 0, 1, 0, 1, 1),
w=c(0.31, 0.42, 0.59, 0.45, 0.6, 0.7, 0.55, 0.6,
0.52, 0.54, 0.56, 0.43, 0.41, 0.39, 0.34, 0.38, 0.21),
doseGrid=c(0.1, 0.5, 1.5, 3, 6,
seq(from=10, to=80, by=2)))
# Initialize the DualEndpoint model (in this case RW1)
model < DualEndpointRW(mu = c(0, 1),
Sigma = matrix(c(1, 0, 0, 1), nrow=2),
sigma2betaW = 0.01,
sigma2W = c(a=0.1, b=0.1),
rho = c(a=1, b=1),
smooth = "RW1")
# Setup some MCMC parameters and generate samples from the posterior
options < McmcOptions(burnin=100,
step=2,
samples=500)
set.seed(94)
samples < mcmc(data, model, options)
# Plot the posterior mean (and empirical 2.5 and 97.5 percentile)
# for the prob(DLT) by doses and the Biomarker by doses
#grid.arrange(plot(x = samples, y = model, data = data))
plot(x = samples, y = model, data = data)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.