| DRDensityPlot {clinDR} | R Documentation |
Plot Bayes or confidence interval density contours over a grid of points (usually dose or time)
Description
Density plot for distributions conditional on a variable. A grid of values are specified for the conditioning variable, which is plotted on the horizontal axis. The conditioning variable is typically dose or time
Usage
DRDensityPlot(x,qL,qH,qlevL=c(0.025,0.05,0.10,0.25),
xlim,ylim,xlab='x',ylab='y')
Arguments
x |
A grid of conditioning values to be plotted on the horizontal axis. This grid typically represents dose or time. |
qL |
Lower percentiles, confidence or probabiity levels. |
qH |
Upper percentiles, confidence or probabiity levels. |
qlevL |
Density intervals are formed with percentile boundaries at (qlevL,1-qlevL).
|
xlim |
Plot limits for the x-axis |
ylim |
Plot limits for the y-axis |
xlab |
x-axis label |
ylab |
y-axis label |
Details
The function takes as input percentiles defining confidence
intervals or Bayesian probability
intervals at different levels (e.g. 5,95, 25,75) for distributions conditional
on a variable that is typically dose or time. Regions defined by different
confidence/probability levels are represented by different levels of shading.
The input parameter, qlevL, is used only to define the input in the
matrices qL and qH. The qlevL is not used for any numerical
calculations, which must be done before executing the function.
Value
Plotted output only.
Author(s)
Neal Thomas
See Also
Examples
## Not run:
data('metaData')
exdat<-metaData[metaData$taid==32,]
msSat<-sum((exdat$sampsize-1)*(exdat$sd)^2)/(sum(exdat$sampsize)-length(exdat$sampsize))
fitout<-fitEmax(exdat$rslt,exdat$dose,modType=3,count=exdat$sampsize,
msSat=msSat)
dgrid<-seq(0,100,length=100)
seout95<-predict(fitout,dgrid,clev=0.95)
seout90<-predict(fitout,dgrid,clev=0.9)
seout80<-predict(fitout,dgrid,clev=0.8)
seout50<-predict(fitout,dgrid,clev=0.5)
qlev<-c(0.025,0.05,0.10,0.25)
qL<-cbind(seout95$ubdif,seout90$ubdif,seout80$ubdif,seout50$ubdif)
qH<-cbind(seout95$lbdif,seout90$lbdif,seout80$lbdif,seout50$lbdif)
DRDensityPlot(dgrid,qL,qH,qlevL=qlev,xlab='Dose',ylab='Diff with PBO')
## End(Not run)