Profile pairs
This function produces pairwise plots of profile traces, profile sketches, and ellipse approximations to confidence intervals.
## S3 method for class 'profile' pairs(x, labels = c(names(x), "Profile tau"), panel = lines, invert = TRUE, plot.tau = TRUE, plot.trace = TRUE, plot.sketch = TRUE, plot.ellipse = FALSE, level = 0.95, ...)
x |
An object of class |
labels |
The labels to use for each variable. These default to the variable names. |
panel |
The function to use to draw the sketch in each panel. |
invert |
Whether to swap the axes so things look better. |
plot.tau |
Whether to do the profile tau (profile t) plots. |
plot.trace |
Whether to do the profile trace plots. |
plot.sketch |
Whether to do the profile sketch plots. |
plot.ellipse |
Whether to do the ellipse approximations. |
level |
The nominal confidence level for the profile sketches and ellipses. |
... |
Other plotting parameters. |
This function implements the plots used in Bates and Watts (1988) for nonlinear regression diagnostics.
Unfortunately, the MASS package also defines a
pairs.profile
method. The ellipse::pairs
generic is supplied to allow users to choose to use
the version in this package.
If x
is a profile object, then ellipse::pairs(x)
is guaranteed to call the method from this package. If you'd rather use
the MASS method, then two steps are needed: you need to
be sure that MASS is loaded, then call graphics::pairs(x)
.
(If MASS is not loaded, you'll get the default method from the graphics package, which will
trigger an error since it doesn't know about profile
objects.)
If both ellipse and MASS are loaded, then pairs(x)
is slightly ambiguous: the method that is called depends
on the ordering of ellipse and graphics (not MASS!) in the search list. In almost all cases
ellipse will precede graphics, so the ellipse method will usually be the default.
If x
is any object
other than a profile object, ellipse::pairs(x)
will pass the call on to graphics::pairs(x)
,
and the standard method will be called.
Produces a plot on the current device for each pair of variables in the profile object.
Bates and Watts (1988), Nonlinear Regression Analysis \& its Applications.
# Plot everything for the Puromycin data data(Puromycin) Purboth <- nls(formula = rate ~ ((Vm + delV * (state == "treated")) * conc)/(K + conc), data = Puromycin, start = list(Vm = 160, delV = 40, K = 0.05)) Pur.prof <- profile(Purboth) ellipse::pairs(Pur.prof, plot.ellipse = TRUE) # Show the corresponding plot from MASS: if (requireNamespace("MASS")) graphics::pairs(Pur.prof)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.