Learn R Programming

MCPMod (version 1.0-10.1)

plot.LP: Plot method for LP objects

Description

Graphically displays an LP object.

Usage

# S3 method for LP
plot(x, line = TRUE, type = NULL, spldf = 5, ...)

Arguments

x

LP object as obtained from a call to the LP function

line

Logical indicating whether the power values should be smoothed.

type

One of "LP1", "LP2" or "both", availability depending on whether the corresponding values have been calculated in the call to the LP function.

spldf

Numeric determining the degrees of freedom for the smoothing spline which is plotted if line==TRUE. Note that spldf should be larger than 1 and smaller than len (default: 5).

Additional arguments.

Details

The function produces a trellis display of the loss in power for different values of the standardized model parameter. A smoothing spline (with spldf degrees of freedom) is fit to these points to give a smooth impression of the loss in power curve. For models with two prior parameters a trellis display is shown with the number of panels equal to len[2]. The number of points on which the power is evaluated is equal to len[1] in each panel, where len is an argument of the LP function.

See Also

LP

Examples

Run this code
# NOT RUN {
doses <- c(0,10,25,50,100,150)                                           
models <- list(linear=NULL, emax=c(25),
           logistic=c(50,10.88111), exponential=c(85),
           betaMod=matrix(c(0.33,2.31,1.39,1.39),byrow=TRUE,nrow=2))

# Examples from JBS paper, p.654
LPobj <- LP(models, model = "emax", type = "both", paramRange = c(10,70),
           doses = doses, base = 0, maxEff = 0.4, sigma = 1, n = 60,     
           alpha = 0.05, len = 15, scal = 200)
plot(LPobj)
plot(LPobj, line = FALSE, type = "LP1")
plot(LPobj, type = "LP1", spldf = 9)
# }

Run the code above in your browser using DataLab