| Line 18... |
Line 18... |
| 18 |
|
18 |
|
| 19 |
\method{cdplot}{default}(x, y,
|
19 |
\method{cdplot}{default}(x, y,
|
| 20 |
plot = TRUE, tol.ylab = 0.05, ylevels = NULL,
|
20 |
plot = TRUE, tol.ylab = 0.05, ylevels = NULL,
|
| 21 |
bw = "nrd0", n = 512, from = NULL, to = NULL,
|
21 |
bw = "nrd0", n = 512, from = NULL, to = NULL,
|
| 22 |
col = NULL, border = 1, main = "", xlab = NULL, ylab = NULL,
|
22 |
col = NULL, border = 1, main = "", xlab = NULL, ylab = NULL,
|
| 23 |
yaxlabels = NULL, xlim = NULL, ylim = c(0, 1), \dots)
|
23 |
yaxlabels = NULL, xlim = NULL, ylim = c(0, 1), weights = NULL, \dots)
|
| 24 |
|
24 |
|
| 25 |
\method{cdplot}{formula}(formula, data = list(),
|
25 |
\method{cdplot}{formula}(formula, data = list(),
|
| 26 |
plot = TRUE, tol.ylab = 0.05, ylevels = NULL,
|
26 |
plot = TRUE, tol.ylab = 0.05, ylevels = NULL,
|
| 27 |
bw = "nrd0", n = 512, from = NULL, to = NULL,
|
27 |
bw = "nrd0", n = 512, from = NULL, to = NULL,
|
| 28 |
col = NULL, border = 1, main = "", xlab = NULL, ylab = NULL,
|
28 |
col = NULL, border = 1, main = "", xlab = NULL, ylab = NULL,
|
| 29 |
yaxlabels = NULL, xlim = NULL, ylim = c(0, 1), \dots,
|
29 |
yaxlabels = NULL, xlim = NULL, ylim = c(0, 1), \dots,
|
| 30 |
subset = NULL)
|
30 |
subset = NULL, weights = NULL)
|
| 31 |
}
|
31 |
}
|
| 32 |
\arguments{
|
32 |
\arguments{
|
| 33 |
\item{x}{an object, the default method expects a single numerical
|
33 |
\item{x}{an object, the default method expects a single numerical
|
| 34 |
variable (or an object coercible to this).}
|
34 |
variable (or an object coercible to this).}
|
| 35 |
\item{y}{a \code{"factor"} interpreted to be the dependent variable}
|
35 |
\item{y}{a \code{"factor"} interpreted to be the dependent variable}
|
| Line 50... |
Line 50... |
| 50 |
\item{yaxlabels}{character vector for annotation of y axis, defaults to
|
50 |
\item{yaxlabels}{character vector for annotation of y axis, defaults to
|
| 51 |
\code{levels(y)}.}
|
51 |
\code{levels(y)}.}
|
| 52 |
\item{xlim, ylim}{the range of x and y values with sensible defaults.}
|
52 |
\item{xlim, ylim}{the range of x and y values with sensible defaults.}
|
| 53 |
\item{subset}{an optional vector specifying a subset of observations
|
53 |
\item{subset}{an optional vector specifying a subset of observations
|
| 54 |
to be used for plotting.}
|
54 |
to be used for plotting.}
|
| - |
|
55 |
\item{weights}{numeric. A vector of frequency weights for each
|
| - |
|
56 |
observation in the data. If \code{NULL} all weights are implicitly
|
| - |
|
57 |
assumed to be 1.}
|
| 55 |
}
|
58 |
}
|
| 56 |
\details{
|
59 |
\details{
|
| 57 |
\code{cdplot} computes the conditional densities of \code{x} given
|
60 |
\code{cdplot} computes the conditional densities of \code{x} given
|
| 58 |
the levels of \code{y} weighted by the marginal distribution of \code{y}.
|
61 |
the levels of \code{y} weighted by the marginal distribution of \code{y}.
|
| 59 |
The densities are derived cumulatively over the levels of \code{y}.
|
62 |
The densities are derived cumulatively over the levels of \code{y}.
|