summary.dtrace {dtrace}R Documentation

Summaries for dtrace Objects

Description

This function gathers and returns useful information from density trace objects. A print method is defined so that the values computed by this function are printed nicely.

Usage

summary(object, ...)
print(x, digits = max(4, getOption("digits") - 4), ...)

Arguments

object An object of class dtrace.
x An object of class summary.dtrace.
digits The number of significant digits to be used in printing.
... Other arguments to be passed to print.

Value

The summary method for dtrace objects returns a list with components:

xlim The range of x values covered by all the density estimates in the first argument.
ylim The range of y values covered by all the density estimates in the first argument.
names The names associated with each group for which a density estimate was obtained.
nobs The number of observations in each group for which a density estimate was obtained.
bw The bandwidth(s) of the kernel(s) used to compute the density estimates (see dtrace).
sd The standard deviation(s) of the kernel(s) used to compute the density estimates (see dtrace).

Author(s)

Ross Ihaka.

See Also

dtrace.

Examples

## Simple density estimation.
## Here we are using automatic bandwidth selection.
data(faithful)
d <- dtrace(faithful$eruptions, sd = "sj")
plot(d, xlab = paste("Kernel Bandwidth =",
                     signif(summary(d)$bw, 4)),
     main = "Old Faithful Data")

[Package Contents]