eafdiff {moocore} | R Documentation |
Compute empirical attainment function differences
Description
Calculate the differences between the empirical attainment functions of two data sets.
Usage
eafdiff(x, y, intervals = NULL, maximise = FALSE, rectangles = FALSE)
Arguments
x , y |
|
intervals |
|
maximise |
|
rectangles |
|
Details
This function calculates the differences between the EAFs of two data sets.
Value
With rectangle=FALSE
, a data.frame
containing points where there
is a transition in the value of the EAF differences. With
rectangle=TRUE
, a matrix
where the first 4 columns give the
coordinates of two corners of each rectangle. In both cases, the last
column gives the difference in terms of sets in x
minus sets in y
that
attain each point (i.e., negative values are differences in favour y
).
See Also
Examples
A1 <- read_datasets(text='
3 2
2 3
2.5 1
1 2
1 2
')
A2 <- read_datasets(text='
4 2.5
3 3
2.5 3.5
3 3
2.5 3.5
2 1
')
d <- eafdiff(A1, A2)
str(d)
d
d <- eafdiff(A1, A2, rectangles = TRUE)
str(d)
d