plot.fitEmax {clinDR}  R Documentation 
Plot an Emax model stored in an object
created by function fitEmax
.
## S3 method for class 'fitEmax'
plot(
x,int=0,plotResid=FALSE,clev=0.9,
predict=TRUE,plotci=TRUE,plotDif=FALSE,
xlab='Dose',
ylab=ifelse(plotResid,'Residuals',ifelse(plotDif,
'Difference With Placebo','Response')),
symbol=NULL,symbolLabel='Group',symbolShape=8,
symbolColor='red',symbolSize=4,
bwidth=NULL,
xlim=NULL,
xat=NULL,
ylim=NULL,
logScale=FALSE,
ngrid=200,
plot=TRUE, ...)
x 
Output of 
int 
The index for the protocol (intercept) to use for the predictions
and computation of dose group means and standard errors. The default
value is 
plotResid 
If 
clev 
Confidence level for intervals about the estimated mean for each dose. 
predict 
When predict=TRUE, predictive intervals for sample dose group
means are plotted. They are grayshaded bars. If there is 
plotci 
When plotCI=TRUE, confidence intervals for the population dose group means are plotted. They are black bars. 
plotDif 
Plot difference between doses and placebo. It is assumed the lowest dose in each protocol is placebo. 
xlab 
Label for the xaxis 
ylab 
Label for the yaxis 
symbol 
An optional grouping variable.
The values of symbol must correspond to the original data used in

symbolLabel 
Label given to symbol in plot legend. 
symbolShape 
A character vector with named elements giving
the shapes assigned
to different levels of variable 
symbolColor 
A character vector with named elements
giving the colors assigned
to different levels of variable 
symbolSize 
The size of the symbol for the dose group sample means.
Set 
bwidth 
Width of the cap on the predictive interval bars. 
xlim 
Plot limits for the xaxis 
xat 
The points at which tickmarks are to be drawn. Errors occur if the points are outside the range of xlim. By default (when NULL) tickmark locations are computed. 
ylim 
Plot limits for the yaxis 
logScale 
If 
ngrid 
The number doses evaluated when plotting the curve. 
plot 
Return plotting output without plotting. 
... 
No additional plotting options are currently used. 
Model estimates, standard errors, and confidence bounds are computed
using function SeEmax
.
The function generates random numbers when predict=TRUE
, so the random number generator/seed must
be set before the function is called for exact reproducibility.
A list with ggplot object, and a matrix with the confidence and prediction interval limits.
Neal Thomas
### example changes the random number seed
doselev<c(0,5,25,50,100,350)
n<c(78,81,81,81,77,80)
### population parameters for simulation
e0<2.465375
ed50<67.481113
dtarget<100
diftarget<9.032497
emax<solveEmax(diftarget,dtarget,log(ed50),1,e0)
sdy<8.0
pop.parm<c(log(ed50),emax,e0)
dose<rep(doselev,n)
meanlev<emaxfun(dose,pop.parm)
y<rnorm(sum(n),meanlev,sdy)
testout<fitEmax(y,dose,modType=4)
plot(testout)