The R Project SVN R

Rev

Rev 59039 | Rev 84085 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 59039 Rev 61433
Line 32... Line 32...
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}
36
  \item{formula}{a \code{"formula"} of type \code{y ~ x} with a single dependent
36
  \item{formula}{a \code{"formula"} of type \code{y ~ x} with a single dependent
37
    \code{"factor"} and a single numerical explanatory variable.}    
37
    \code{"factor"} and a single numerical explanatory variable.}
38
  \item{data}{an optional data frame.}
38
  \item{data}{an optional data frame.}
39
  \item{plot}{logical. Should the computed conditional densities be plotted?}
39
  \item{plot}{logical. Should the computed conditional densities be plotted?}
40
  \item{tol.ylab}{convenience tolerance parameter for y-axis annotation.
40
  \item{tol.ylab}{convenience tolerance parameter for y-axis annotation.
41
    If the distance between two labels drops under this threshold, they are
41
    If the distance between two labels drops under this threshold, they are
42
    plotted equidistantly.}
42
    plotted equidistantly.}
43
  \item{ylevels}{a character or numeric vector specifying in which order
43
  \item{ylevels}{a character or numeric vector specifying in which order
44
    the levels of the dependent variable should be plotted.}
44
    the levels of the dependent variable should be plotted.}
45
  \item{bw, n, from, to, \dots}{arguments passed to \code{\link{density}}}
45
  \item{bw, n, from, to, \dots}{arguments passed to \code{\link{density}}}
46
  \item{col}{a vector of fill colors of the same length as \code{levels(y)}.
46
  \item{col}{a vector of fill colors of the same length as \code{levels(y)}.
47
    The default is to call \code{\link{gray.colors}}.}  
47
    The default is to call \code{\link{gray.colors}}.}
48
  \item{border}{border color of shaded polygons.}  
48
  \item{border}{border color of shaded polygons.}
49
  \item{main, xlab, ylab}{character strings for annotation}
49
  \item{main, xlab, ylab}{character strings for annotation}
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
Line 60... Line 60...
60
 
60
 
61
  This visualization technique is similar to spinograms (see \code{\link{spineplot}})
61
  This visualization technique is similar to spinograms (see \code{\link{spineplot}})
62
  and plots \eqn{P(y | x)} against \eqn{x}. The conditional probabilities
62
  and plots \eqn{P(y | x)} against \eqn{x}. The conditional probabilities
63
  are not derived by discretization (as in the spinogram), but using a smoothing
63
  are not derived by discretization (as in the spinogram), but using a smoothing
64
  approach via \code{\link{density}}.
64
  approach via \code{\link{density}}.
65
  
65
 
66
  Note, that the estimates of the conditional densities are more reliable for 
66
  Note, that the estimates of the conditional densities are more reliable for
67
  high-density regions of \eqn{x}. Conversely, the are less reliable in regions
67
  high-density regions of \eqn{x}. Conversely, the are less reliable in regions
68
  with only few \eqn{x} observations.
68
  with only few \eqn{x} observations.
69
}
69
}
70
\value{
70
\value{
71
  The conditional density functions (cumulative over the levels of \code{y})
71
  The conditional density functions (cumulative over the levels of \code{y})