plot.nlreg.profiles: Use plot() on a 'profile.nlreg' and 'all.profiles.nlreg'...

Description Usage Arguments Details Value Side Effects References See Also Examples

Description

These are methods for the function plot for objects inheriting from class "profile.nlreg" or "all.profiles.nlreg" .

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'nlreg.profile'
plot(x, alpha = 0.05, add.leg = FALSE, stats = c("sk", "fr"), 
     cex = 0.7, cex.lab = 1, cex.axis = 1, cex.main = 1, lwd1 = 1, 
     lwd2 = 2, lty1 = "solid", lty2 = "solid", cl1 = "blue", 
     cl2 = "red", col = "black", ylim = c(-3,3), ...)
## S3 method for class 'all.nlreg.profiles'
plot(x, nframe, alpha = 0.05, stats = c("sk", "fr"), cex = 0.7, 
     cex.lab = 1, cex.axis = 1, cex.main = 1, lwd1 = 1, lwd2 = 2, 
     lty1 = "solid", lty2 = "solid", cl1 = "blue", cl2 = "red", 
     col = "black", ylim = c(-3,3), ...)

Arguments

x

an object of class profile.nlreg or all.profiles.nlreg such as generated by a call to profile.nlreg.

nframe

the number of frames into which to split the graphics device; only if x is an all.profiles.nlreg object.

alpha

numeric vector with the levels used to read off confidence intervals; the default is 5% which corresponds to a confidence level of 1-\code{alpha}=0.95.

stats

character value indicating which higher order statistics to plot. Admissible values are "sk" for Skovgaard's (1996) proposal and "fr" for Fraser, Reid and Wu's (1999) approach. The default is "sk".

add.leg

logical value indicating whether a legend should be added to the plot; only if x is a profile.nlreg object. The default is FALSE.

cex, cex.lab, cex.axis, cex.main

the character expansions relative to the standard size of the device to be used for printing text, labels, axes and main title. See par for details.

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".

ylim

a numerical vector with two elements defining the y-axis range; only if x is a profile.nlreg object.

...

additional graphics parameters.

Details

The function defaults to:

1
2
3
4
plot.nlreg.profile(x = stop("nothing to plot"), alpha = 0.05, add.leg = FALSE, 
                   stats = c("sk", "fr"), cex = 0.7, cex.lab = 1, cex.axis = 1, 
                   cex.main = 1, lwd1 = 1, lwd2 = 2, lty1 = "solid", lty2 = "solid", 
                   cl1 = "blue", cl2 = "red", col = "black", ylim = c(-3,3), \dots)
1
2
3
4
plot.all.nlreg.profiles(x = stop("nothing to plot"), nframe, alpha = 0.05, 
                        stats = c("sk", "fr"), cex = 0.7, cex.lab = 1, cex.axis = 1, 
                        cex.main = 1, lwd1 = 1, lwd2 = 2, lty1 = "solid", lty2 = "solid", 
                        cl1 = "blue", cl2 = "red", col = "black", ylim = c(-3,3), \dots)

Value

No value is returned.

Side Effects

A plot is produced on the current graphics device.

References

Fraser, D.A.S., Reid, N. and Wu, J. (1999). A simple general formula for tail probabilities for frequentist and Bayesian inference. Biometrika, 86, 249–264.

Skovgaard, I. (1996) An explicit large-deviation approximation to one-parameter tests. Bernoulli, 2, 145–165.

See Also

profile.nlreg, nlreg.profile.objects, plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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, offset = g, trace = TRUE )
plot( metsulfuron.prof, lwd2 = 2 )
##
metsulfuron.prof <- profile( metsulfuron.nl, trace = TRUE )
plot( metsulfuron.prof, lwd2 = 2, nframe = c(2,3) )
## End(Not run)

Example output

Loading required package: statmod
Loading required package: survival

   Package "nlreg" 1.2-2 (2014-03-31) 
    Copyright (C) 2000-2014 R. Bellio & A. R. Brazzale

 This is free software, and you are welcome to redistribute
 it and/or modify it under the terms of the GNU General
 Public License published by the Free Software Foundation.
 Package "nlreg" comes with ABSOLUTELY NO WARRANTY.

 type `help(package="nlreg")' for summary information


differentiating mean and variance function -- may take a while

g = -1.35912 
g = -1.55936 
g = -1.7596 
g = -1.95984 
g = -2.16007 
g = -2.36031 
g = -2.56055 
g = -2.76078 
g = -2.96102 
g = -3.16126 
g = -3.3615 
g = -3.56173 
g = -3.76197 
g = -3.96221 
g = -4.16244 

lower range too short
g = -1.15889 
g = -0.95865 
g = -0.758413 
g = -0.558176 
g = -0.357939 
g = -0.157701 
g = 0.0425357 
Higher order method used: Skovgaard's r*

long calculation --- may take a while

Offset: b1

135.45 
128.495 
121.54 
114.585 
107.63 
100.675 
93.72 
142.405 
149.36 
156.315 
163.27 
170.225 
177.18 
184.135 
191.09 
198.045 

Offset: b2

2446.11 
2395.72 
2345.33 
2294.94 
2244.55 
2194.16 
2143.77 
2496.51 
2546.9 
2597.29 
2647.68 
2698.07 
2748.46 
2798.85 
2849.24 

Offset: b3

1.66725 
1.58435 
1.50146 
1.41856 
1.33567 
1.25277 
1.16988 
1.75014 
1.83304 
1.91593 
1.99882 
2.08172 
2.16461 
2.24751 
2.3304 
2.4133 

Offset: b4

0.075248 
0.0712012 
0.0671544 
0.0631076 
0.0590608 
0.0550139 
0.0509671 
0.0792949 
0.0833417 
0.0873885 
0.0914353 
0.0954822 
0.099529 
0.103576 
0.107623 
0.111669 

Offset: g

-1.35912 
-1.55936 
-1.7596 
-1.95984 
-2.16007 
-2.36031 
-2.56055 
-2.76078 
-2.96102 
-3.16126 
-3.3615 
-3.56173 
-3.76197 
-3.96221 
-4.16244 

lower range too short
-1.15889 
-0.95865 
-0.758413 
-0.558176 
-0.357939 
-0.157701 
0.0425357 

Offset: logs

-3.86672 
-3.96038 
-4.05404 
-4.1477 
-4.24136 
-4.33502 
-4.42868 
-3.77306 
-3.67941 
-3.58575 
-3.49209 
-3.39843 
-3.30477 
-3.21111 
-3.11745 
-3.02379 
-2.93013 
Warning messages:
1: In log(b1 + (b2 - b1)/(1 + (dose/b4)^b3)) : NaNs produced
2: In log(b1 + (b2 - b1)/(1 + (dose/b4)^b3)) : NaNs produced
3: In log(b1 + (b2 - b1)/(1 + (dose/b4)^b3)) : NaNs produced
4: In log(b1 + (b2 - b1)/(1 + (dose/b4)^b3)) : NaNs produced
Higher order method used: Skovgaard's r*

nlreg documentation built on May 1, 2019, 9:21 p.m.