plot and pairs methods for objects of
class "profile".
Usage
## S3 method for class 'profile'
plot(x, ...)
## S3 method for class 'profile'
pairs(x, colours = 2:3, ...)
Arguments
x
an object inheriting from class "profile".
colours
Colours to be used for the mean curves conditional on
x and y respectively.
...
arguments passed to or from other methods.
Details
This is the main plot method for objects created by
profile.glm. It can also be called on objects created
by profile.nls, but they have a specific method,
plot.profile.nls.
The pairs method shows, for each pair of parameters x and
y, two curves intersecting at the maximum likelihood estimate, which
give the loci of the points at which the tangents to the contours of
the bivariate profile likelihood become vertical and horizontal,
respectively. In the case of an exactly bivariate normal profile
likelihood, these two curves would be straight lines giving the
conditional means of y|x and x|y, and the contours would be exactly
elliptical.
Author(s)
Originally, D. M. Bates and W. N. Venables. (For S in 1996.)
See Also
profile.glm, profile.nls.
Examples
## see ?profile.glm for an example using glm fits.
## a version of example(profile.nls) from R >= 2.8.0
fm1 <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
pr1 <- profile(fm1, alpha = 0.1)
MASS:::plot.profile(pr1)
pairs(pr1) # a little odd since the parameters are highly correlated
## an example from ?nls
x <- -(1:100)/10
y <- 100 + 10 * exp(x / 2) + rnorm(x)/10
nlmod <- nls(y ~ Const + A * exp(B * x), start=list(Const=100, A=10, B=1))
pairs(profile(nlmod))
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MASS)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MASS/plot.profile.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plot.profile
> ### Title: Plotting Functions for 'profile' Objects
> ### Aliases: plot.profile pairs.profile
> ### Keywords: models hplot
>
> ### ** Examples
>
> ## see ?profile.glm for an example using glm fits.
>
> ## a version of example(profile.nls) from R >= 2.8.0
> fm1 <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
> pr1 <- profile(fm1, alpha = 0.1)
> MASS:::plot.profile(pr1)
> pairs(pr1) # a little odd since the parameters are highly correlated
>
> ## an example from ?nls
> x <- -(1:100)/10
> y <- 100 + 10 * exp(x / 2) + rnorm(x)/10
> nlmod <- nls(y ~ Const + A * exp(B * x), start=list(Const=100, A=10, B=1))
> pairs(profile(nlmod))
>
>
>
>
>
> dev.off()
null device
1
>