auc {esvis} | R Documentation |
Compute the Area Under the pp_plot Curve
Calculates the area under the pp
curve. The area under the curve is
also a useful effect-size like statistic, representing the probability that
a randomly selected individual from the x
distribution will have a
higher value than a randomly selected individual from the y
distribution.
Description
Compute the Area Under the pp_plot Curve
Calculates the area under the pp
curve. The area under the curve is
also a useful effect-size like statistic, representing the probability that
a randomly selected individual from the x
distribution will have a
higher value than a randomly selected individual from the y
distribution.
Usage
auc(data, formula, ref_group = NULL, rename = TRUE)
Arguments
data |
The data frame used for estimation - ideally structured in a tidy format. |
formula |
A formula of the type |
ref_group |
Optional. A character vector or forumla listing the
reference group levels for each variable on the right hand side of the
formula, supplied in the same order as the formula. Note that if using the
formula version, levels that are numbers, or include hyphens, spaces, etc.,
should be wrapped in back ticks (e.g.,
|
rename |
Used primarily for internal purposes. Should the column
names be renamed to reference the focal and reference groups? Defaults to
|
Value
By default the area under the curve for all possible pairings of the grouping factor are returned.
Examples
# Calculate AUC for all pairwise comparisons
auc(star, reading ~ condition)
# Report only relative to regular-sized classrooms
auc(star,
reading ~ condition,
ref_group = "reg")
# Report by ELL and FRL groups for each season, compare to non-ELL students
# who were not eligible for free or reduced price lunch in the fall (using
# the formula interface for reference group referencing).
## Not run:
auc(benchmarks,
math ~ ell + frl + season,
ref_group = ~`Non-ELL` + `Non-FRL` + Fall)
# Same thing but with character vector supplied, rather than a formula
auc(benchmarks,
math ~ ell + frl + season,
ref_group = c("Non-ELL", "Non-FRL", "Fall"))
## End(Not run)