Learn R Programming

hce (version 0.6.7)

plot.hce: A plot method for hce objects

Description

A plot method for hce objects

Usage

# S3 method for hce
plot(x, ...)

Value

no return value, called for plotting.

Arguments

x

an object of class hce created by as_hce().

...

additional arguments to be passed to base::plot() function.

References

Bamber D. "The area above the ordinal dominance graph and the area below the receiver operating characteristic graph." Journal of Mathematical Psychology 12.4 (1975): 387-415. doi:10.1016/0022-2496(75)90001-2

Examples

Run this code
d <- as_hce(KHCE)
res <- calcWO(AVAL ~ TRTP, data = d)
plot(d, col = 2, type = 'l', ylab = "Active", xlab = "Control", lwd = 2)
polygon(c(0, 1, 1, 0), c(1, 1, 1, 0), col = 2)
legend("bottomright", legend = paste0("WP = ", round(res$WP, 5)))

Run the code above in your browser using DataLab