rvoverlap {rv} | R Documentation |
Tests whether the uncertainty intervals of the given random variables overlap with a given interval.
NOTE. Still experimental.
rvoverlap(obj, iv, interval=0.95, one.sided=FALSE, left=TRUE)
obj |
random variable (vector or array) |
iv |
an interval (range) |
interval |
size of the (middle) interval |
one.sided |
logical, FALSE if two-sided interval is desired |
left |
logical, indicating if the left one-sided interval is desired |
0 |
Middle interval is fully enclosed by iv |
-1 |
Middle interval is partially covered on the left of iv |
+1 |
Middle interval is partially covered on the right of iv |
-Inf |
Middle interval is completely to the left of iv |
+Inf |
Middle interval is completely to the right of iv |
Jouni Kerman kerman@stat.columbia.edu http://www.stat.columbia.edu/~kerman
Kerman, Jouni and Gelman, Andrew. Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Technical report, Columbia University, New York.
rvoverlap(rvnorm(20), iv=c(-1,1), interval=0.683) #