plot.emaxsimobj {clinDR}R Documentation

Plot dose response from a data set generated by emaxsim

Description

Plot of population dose response curve, dose group means with CIs, predictive intervals, and the model-based estimated dose response curve.

Usage

## S3 method for class 'emaxsimobj'
plot(
    x, xlim, xat=NULL, ylim, xlab, ylab,
    plotDif=FALSE,
    plotResid=FALSE,
    clev = 0.9, 
    plotPop=c('m','3','4'),     
    negC = FALSE, 
    logScale=FALSE,
    predict=TRUE, 
    plot=TRUE, ...)

Arguments

x

Extracted data object from emaxsim

xlim

x-axis limits

xat

The points at which tick-marks are to be drawn. Errors occur if the points are outside the range of xlim. By default (when NULL) tickmark locations are computed.

ylim

y-axis limits

xlab

x-axis label

ylab

y-axis label

plotDif

When TRUE, the difference with placebo is plotted.

plotResid

When TRUE, residuals (dose group means) are plotted.

clev

Level for confidence intervals

plotPop

Plot population dose response curve when plotPop='m' using linear interpolation between population means, when PlotPop='3' or '4', using the population Emax parameters that must be supplied with the data generator (see FixedMean or RandEmax). If the Emax parameters are not available, linear interpolation is used.

negC

If the ED50<lower ED50 limit, TRUE causes the Emax model to be plotted in addition to the alternative model selected.

logScale

If TRUE, log scale is used for dose.

predict

When TRUE, predictive intervals are plotted with grey errorbars in addition to the confidence intervals.

plot

Return plotting output without plotting.

...

Other plot parameters (not used).

Value

ggplot object is returned

Author(s)

Neal Thomas

See Also

emaxsim, print.emaxsimobj, summary.emaxsimobj, update.emaxsimobj

Examples

## Not run: 
## emaxsim changes the random number seed

nsim<-50
idmax<-5
doselev<-c(0,5,25,50,100)
n<-c(78,81,81,81,77)

### population parameters for simulation
e0<-2.465375 
ed50<-67.481113 

dtarget<-100
diftarget<-9.032497
emax<-solveEmax(diftarget,dtarget,log(ed50),1,e0)

sdy<-7.967897
pop<-c(log(ed50),emax,e0)    
meanlev<-emaxfun(doselev,pop)  

###FixedMean is specialized constructor function for emaxsim
gen.parm<-FixedMean(n,doselev,meanlev,sdy)  
D1 <- emaxsim(nsim,gen.parm)
e49<-D1[49]

plot(e49,clev=0.8)  

## End(Not run)


[Package clinDR version 2.3.5 Index]