| Line 10... |
Line 10... |
| 10 |
}
|
10 |
}
|
| 11 |
\usage{
|
11 |
\usage{
|
| 12 |
cdplot(x, \dots)
|
12 |
cdplot(x, \dots)
|
| 13 |
|
13 |
|
| 14 |
\method{cdplot}{default}(x, y,
|
14 |
\method{cdplot}{default}(x, y,
|
| 15 |
plot = TRUE, tol.ylab = 0.05,
|
15 |
plot = TRUE, tol.ylab = 0.05, ylevels = NULL,
|
| 16 |
bw = "nrd0", n = 512, from = NULL, to = NULL,
|
16 |
bw = "nrd0", n = 512, from = NULL, to = NULL,
|
| 17 |
col = NULL, border = 1, main = "", xlab = NULL, ylab = NULL,
|
17 |
col = NULL, border = 1, main = "", xlab = NULL, ylab = NULL,
|
| 18 |
yaxlabels = NULL, xlim = NULL, ylim = c(0, 1), \dots)
|
18 |
yaxlabels = NULL, xlim = NULL, ylim = c(0, 1), \dots)
|
| 19 |
|
19 |
|
| 20 |
\method{cdplot}{formula}(formula, data = list(),
|
20 |
\method{cdplot}{formula}(formula, data = list(),
|
| 21 |
plot = TRUE, tol.ylab = 0.05,
|
21 |
plot = TRUE, tol.ylab = 0.05, ylevels = NULL,
|
| 22 |
bw = "nrd0", n = 512, from = NULL, to = NULL,
|
22 |
bw = "nrd0", n = 512, from = NULL, to = NULL,
|
| 23 |
col = NULL, border = 1, main = "", xlab = NULL, ylab = NULL,
|
23 |
col = NULL, border = 1, main = "", xlab = NULL, ylab = NULL,
|
| 24 |
yaxlabels = NULL, xlim = NULL, ylim = c(0, 1), \dots,
|
24 |
yaxlabels = NULL, xlim = NULL, ylim = c(0, 1), \dots,
|
| 25 |
subset = NULL)
|
25 |
subset = NULL)
|
| 26 |
}
|
26 |
}
|
| Line 32... |
Line 32... |
| 32 |
\item{data}{an optional data frame.}
|
32 |
\item{data}{an optional data frame.}
|
| 33 |
\item{plot}{logical. Should the computed conditional densities be plotted?}
|
33 |
\item{plot}{logical. Should the computed conditional densities be plotted?}
|
| 34 |
\item{tol.ylab}{convenience tolerance parameter for y-axis annotation.
|
34 |
\item{tol.ylab}{convenience tolerance parameter for y-axis annotation.
|
| 35 |
If the distance between two labels drops under this threshold, they are
|
35 |
If the distance between two labels drops under this threshold, they are
|
| 36 |
plotted equidistantly.}
|
36 |
plotted equidistantly.}
|
| - |
|
37 |
\item{ylevels}{a character or numeric vector specifying in which order
|
| - |
|
38 |
the levels of the dependent variable should be plotted.}
|
| 37 |
\item{bw, n, from, to, \dots}{arguments passed to \code{\link{density}}}
|
39 |
\item{bw, n, from, to, \dots}{arguments passed to \code{\link{density}}}
|
| 38 |
\item{col}{a vector of fill colors of the same length as \code{levels(y)}.
|
40 |
\item{col}{a vector of fill colors of the same length as \code{levels(y)}.
|
| 39 |
The default is to call \code{\link{gray.colors}}.}
|
41 |
The default is to call \code{\link{gray.colors}}.}
|
| 40 |
\item{border}{border color of shaded polygons.}
|
42 |
\item{border}{border color of shaded polygons.}
|
| 41 |
\item{main, xlab, ylab}{character strings for annotation}
|
43 |
\item{main, xlab, ylab}{character strings for annotation}
|
| Line 86... |
Line 88... |
| 86 |
cdplot(fail ~ temperature, bw = "SJ")
|
88 |
cdplot(fail ~ temperature, bw = "SJ")
|
| 87 |
|
89 |
|
| 88 |
## compare with spinogram
|
90 |
## compare with spinogram
|
| 89 |
(spineplot(fail ~ temperature, breaks = 3))
|
91 |
(spineplot(fail ~ temperature, breaks = 3))
|
| 90 |
|
92 |
|
| - |
|
93 |
## highlighting for failures
|
| - |
|
94 |
cdplot(fail ~ temperature, ylevels = 2:1)
|
| - |
|
95 |
|
| 91 |
## scatter plot with conditional density
|
96 |
## scatter plot with conditional density
|
| 92 |
cdens <- cdplot(fail ~ temperature, plot = FALSE)
|
97 |
cdens <- cdplot(fail ~ temperature, plot = FALSE)
|
| 93 |
plot(I(as.numeric(fail) - 1) ~ jitter(temperature, factor = 2),
|
98 |
plot(I(as.numeric(fail) - 1) ~ jitter(temperature, factor = 2),
|
| 94 |
xlab = "Temperature", ylab = "Conditional failure probability")
|
99 |
xlab = "Temperature", ylab = "Conditional failure probability")
|
| 95 |
lines(53:81, 1 - cdens[[1]](53:81), col = 2)
|
100 |
lines(53:81, 1 - cdens[[1]](53:81), col = 2)
|