1
- \name {pairs.profile }
1
+ \name {pairs_profile }
2
+ \alias {pairs_profile }
2
3
\alias {pairs.profile }
4
+ \alias {ellipse - deprecated }
5
+ \alias {pairs }
3
6
\title {
4
7
Profile pairs
5
8
}
@@ -8,14 +11,17 @@ This function produces pairwise plots of profile traces, profile
8
11
sketches , and ellipse approximations to confidence intervals.
9
12
}
10
13
\usage {
11
- \ method { pairs }{ profile } (x , labels = c(names(x ), " Profile tau" ), panel = lines , invert = TRUE ,
14
+ pairs_profile (x , labels = c(names(x ), " Profile tau" ), panel = lines , invert = TRUE ,
12
15
plot.tau = TRUE , plot.trace = TRUE , plot.sketch = TRUE ,
13
16
plot.ellipse = FALSE , level = 0.95 , \dots )
17
+
18
+ # Deprecated generic function. Use graphics::pairs instead.
19
+ pairs(x , ... )
14
20
}
15
21
\arguments {
16
22
\item {x }{
17
23
An object of class \code {profile }, generally the result of the \code {profile()}
18
- function .
24
+ function .
19
25
}
20
26
\item {labels }{
21
27
The labels to use for each variable. These default to the variable
@@ -53,35 +59,27 @@ profile object.
53
59
This function implements the plots used in Bates and Watts (1988 ) for
54
60
nonlinear regression diagnostics.
55
61
56
- Unfortunately , the \pkg {MASS } package also defines a
57
- \code {\link [MASS : plot.profile ]{pairs.profile }} method. The \code {ellipse :: \link {pairs }}
58
- generic is supplied to allow users to choose to use
59
- the version in this package.
62
+ Prior to \pkg {ellipse } version 0.5 ,
63
+ the \code {pairs_profile } function was a \code {profile }
64
+ method for the \code {pairs } generic. This caused
65
+ various conflicts , because \pkg {graphics } also exports a \code {pairs }
66
+ generic , and package \pkg {MASS } exported a \code {profile }
67
+ method for \code {graphics :: pairs }. As of \R version 4.4.0 ,
68
+ the \pkg {MASS } method will be in \pkg {stats } instead.
60
69
61
- If \code {x } is a profile object , then \code {ellipse :: pairs(x )}
62
- is guaranteed to call the method from this package. If you ' d rather use
63
- the \p kg{MASS} method, then two steps are needed: you need to
64
- be sure that \p kg{MASS} is loaded, then call \c ode{graphics::pairs(x)}.
65
- (If \p kg{MASS} is not loaded, you' ll get the default method from the \pkg {graphics } package , which will
66
- trigger an error since it doesn ' t know about profile
67
- objects.)
68
-
69
- If both \p kg{ellipse} and \p kg{MASS} are loaded, then \c ode{pairs(x)}
70
- is slightly ambiguous: the method that is called depends
71
- on the ordering of \p kg{ellipse} and \p kg{graphics} (not \p kg{MASS}!) in the search list. In almost all cases
72
- \p kg{ellipse} will precede \p kg{graphics}, so the \p kg{ellipse} method will usually be the default.
73
-
74
-
75
- If \c ode{x} is any object
76
- other than a profile object, \c ode{ellipse::pairs(x)}
77
- will pass the call on to \c ode{graphics::pairs(x)},
78
- and the standard method will be called.
70
+ If \code {x } is a profile object then \code {pairs_profile(x )}
71
+ will call the function from this package. If you ' d rather use
72
+ the \p kg{MASS}/\p kg{stats} method, then make sure the appropriate
73
+ package is loaded, and call \c ode{pairs(x)}. (Prior to
74
+ \p kg{ellipse} 0.5, there were complicated rules to determine what
75
+ \c ode{pairs(x)} would do; those should still work for now, but
76
+ \c ode{ellipse::pairs} will disappear in a future release.)
79
77
}
80
78
\r eferences{
81
79
Bates and Watts (1988). Nonlinear Regression Analysis and Its Applications. Wiley. \d oi{10.1002/9780470316757}.
82
80
}
83
81
\s eealso{
84
- \c ode{\l ink{profile}}, \c ode{\l ink{ellipse.profile}}, \c ode{\l ink{ellipse.nls}}
82
+ \c ode{\l ink{pairs}}, \c ode{ \l ink{ profile}}, \c ode{\l ink{ellipse.profile}}, \c ode{\l ink{ellipse.nls}}
85
83
}
86
84
\e xamples{
87
85
# Plot everything for the Puromycin data
@@ -90,11 +88,15 @@ Bates and Watts (1988). Nonlinear Regression Analysis and Its Applications. Wile
90
88
* conc)/(K + conc), data = Puromycin,
91
89
start = list(Vm = 160, delV = 40, K = 0.05))
92
90
Pur.prof <- profile(Purboth)
93
- ellipse::pairs (Pur.prof, plot.ellipse = TRUE)
91
+ pairs_profile (Pur.prof, plot.ellipse = TRUE)
94
92
95
- # Show the corresponding plot from MASS:
96
- if (requireNamespace("MASS"))
97
- graphics::pairs(Pur.prof)
93
+ # Show the corresponding plot from MASS/stats:
94
+ if (getRversion() < "4.4.0") {
95
+ loadNamespace("MASS")
96
+ } else
97
+ loadNamespace("stats")
98
+
99
+ graphics::pairs(Pur.prof)
98
100
}
99
101
\k eyword{dplot}
100
102
\k eyword{regression}
0 commit comments