rvoverlap {rv}R Documentation

Test Whether Intervals Overlap with a Given Interval

Description

Tests whether the uncertainty intervals of the given random variables overlap with a given interval.

NOTE. Still experimental.

Usage

  rvoverlap(obj, iv, interval=0.95, one.sided=FALSE, left=TRUE)

Arguments

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

Value

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

Author(s)

Jouni Kerman kerman@stat.columbia.edu http://www.stat.columbia.edu/~kerman

References

Kerman, Jouni and Gelman, Andrew. Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Technical report, Columbia University, New York.

Examples

  
  rvoverlap(rvnorm(20), iv=c(-1,1), interval=0.683) # 

[Package rv version 0.949 Index]