cdfs: Compute the empirical distribution functions for each of several groups.
Description
This function is a simple wrapper that splits the data frame by the
grouping variable, then loops ecdf through the split
data to return a CDF function for each group.
Usage
cdfs(formula, data, center = FALSE)
Arguments
formula
A formula of the type out ~ group where out is
the outcome variable and group is the grouping variable. Note this
variable can include any arbitrary number of groups.
data
The data frame that the data in the formula come from.
center
Logical. Should the functions be centered prior to plotting?
Value
A list with one function per group (level in the grouping factor).