bw
|
the smoothing bandwidth to be used, see density for details and options.
|
joint.bw
|
character string indicating whether (and how) the smoothing bandwidth should be computed from the joint data distribution when there are multiple subgroups. The options are “mean” (the default), “full”, and “none”. Also accepts a logical argument, where TRUE maps to “mean” and FALSE maps to “none”. See the "Bandwidth selection" section below for a discussion of practical considerations.
|
adjust
|
the bandwidth used is actually adjust*bw. This makes it easy to specify values like ‘half the default’ bandwidth.
|
kernel
|
a character string giving the smoothing kernel to be used. This must partially match one of “gaussian”, “rectangular”, “triangular”, “epanechnikov”, “biweight”, “cosine” or “optcosine”, with default “gaussian”, and may be abbreviated to a unique prefix (single letter).
“cosine” is smoother than “optcosine”, which is the usual ‘cosine’ kernel in the literature and almost MSE-efficient. However, “cosine” is the version used by S.
|
n
|
the number of equally spaced points at which the density is to be estimated. When n > 512, it is rounded up to a power of 2 during the calculations (as fft is used) and the final result is interpolated by approx. So it almost always makes sense to specify n as a power of two.
|
echo.bw
|
where to report the smoothing bandwidth (and the number of observations behind it), since neither is visible from the curve itself. The default FALSE reports nothing. TRUE is shorthand for “sub”, and any combination of “sub” (subtitle), “cap” (caption), and “cat” (printed to the console, with “print” accepted as a synonym) may be given. A destination the user has already labelled is left alone. Bandwidths shared across subgroups are reported once and named as joint; individual bandwidths are reported per group, truncated after three so the label stays legible.
|
alpha
|
numeric value between 0 and 1 specifying the opacity of ribbon shading If no alpha value is provided, then will default to tpar(“ribbon.alpha”) (i.e., probably 0.2 unless this has been overridden by the user in their global settings.)
|
singletons
|
character string indicating what to do with singleton groups, i.e. combinations of by and facet that consist of only 1 row. The default “warn” option removes any singleton cases and emits a warning reporting how many there were. “drop” does the same thing, but quietly. In either case the dropped groups may still be represented as empty facets in your plot. Finally, “none” skips all singleton checks and retains the affected groups; possibly leading to an error. Note that singletons require a numeric bw, since the data-driven bandwidth rules need at least 2 observations.
|