pairs.profile {ellipse}R Documentation

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, ...)



An object of class profile, generally the result of the profile() function.


The labels to use for each variable. These default to the variable names.


The function to use to draw the sketch in each panel.


Whether to swap the axes so things look better.


Whether to do the profile tau (profile t) plots.


Whether to do the profile trace plots.


Whether to do the profile sketch plots.


Whether to do the ellipse approximations.


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.

Side Effects

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.

See Also

profile, ellipse.profile, ellipse.nls


 # Plot everything for the Puromycin data
 Purboth <- nls(formula = rate ~ ((Vm + delV * (state == "treated"))
   * conc)/(K + conc), data = Puromycin,
   start = list(Vm = 160, delV = 40, K = 0.05)) <- profile(Purboth)
 ellipse::pairs(, plot.ellipse = TRUE)
 # Show the corresponding plot from MASS:
 if (requireNamespace("MASS"))

[Package ellipse version 0.4.2 Index]