This function computes the boundaries of an interval which is symmetric around the median and includes a given percentage of the data.
If that's impossible due to ties the interval is chosen to minimize the squared difference between the desired percentage and the actual percentage of the observations included.
Usage
innerval(x, p = 0.95, data.points = TRUE)
Arguments
x
A data vector.
p
The percentage of observations inside the interval.
data.points
Whether to return the most extreme data points within the interval or the interval boundaries.
Value
A vector with the lower and upper boundaries of the interval.