Learn R Programming

nlreg (version 1.2-2.2)

plot.nlreg.contours: Use plot() on a `nlreg.contours' object

Description

This is a method for the function plot for objects inheriting from class nlreg.contours.

Usage

# S3 method for nlreg.contours
plot(x, alpha = c(0.1, 0.05), drawlabels = FALSE, lwd1 = 1, lwd2 = 1, 
     lty1 = "solid", lty2 = "solid", cl1 = "blue", cl2 = "red", 
     col = "black", pch1 = 1, pch2 = 16, cex = 0.5, …)

Arguments

x

a nlreg.contours object, that is, the result of a call to contour.all.nlreg.profiles.

alpha

a numerical vector defining the levels of the contours; the default is c(0.1, 0.05), that is, \(1-\alpha=0.9\) and \(1-\alpha=0.95\).

drawlabels

logical value. Contours are labelled if TRUE.

lwd1, lwd2

the line widths used to compare different curves in the same plot; default is lwd2 = 2 for higher order solutions and lwd1 = 1 for first order solutions.

lty1, lty2

line types used to compare different curves in the same plot; default is "solid" for all statistics.

cl1, cl2, col

colors used to compare different curves in the same plot; default is cl2 = "red" for higher order solutions, and cl1 = "blue" for the remaining first order statistics. The default color of the plot is col = "black".

pch1, pch2

character types used to compare different values in the same plot; default is pch2 = 16 for higher order solutions, and pch1 = 1 for the remaining first order statistics.

cex

the character expansions relative to the standard size of the device to be used for printing text. The default is cex = 0.5.

additional graphics parameters.

Value

No value is returned.

Side Effects

A plot is produced on the current graphics device.

See Also

nlreg.contours.object, contour.all.nlreg.profiles

Examples

Run this code
# NOT RUN {
data(metsulfuron)
metsulfuron.nl <- 
    nlreg( formula = log(area) ~ log( b1+(b2-b1) / (1+(dose/b4)^b3) ), 
           weights = ~ ( 1+dose^exp(g) )^2, data = metsulfuron, 
           start = c(b1 = 138, b2 = 2470, b3 = 2, b4 = 0.07, g = log(0.3)),
           hoa = TRUE )
##
metsulfuron.prof <- profile( metsulfuron.nl, trace = TRUE )
metsulfuron.cont <- contour( metsulfuron.prof, ret = TRUE, plotit = FALSE )
par( mai = rep(0.2, 4) )
plot( metsulfuron.cont )
# }

Run the code above in your browser using DataLab