interval {StabPerf}R Documentation

Returns the middle 'q' percent of a data set

Description

Returns the middle q percent of a data set, e.g. q=0.5 is all data points that lie between the 25th and 75th quantiles

Arguments

data numeric.
q numeric. The middle q percent of the data will be returned:0.0 to 1.0
to.na logical. Whether excluded values should be set to NA or floored or ceilinged to the upper and lower edges of the range q.

Value

data numeric. Middle portion of data. Upper and lower (1-q)/2 percent of data are either floored to the lower limit or ceilinged to the upper limit or are set to NA. Return value is just as long as the input data.

See Also

quantile, filt

Examples

mid <- interval(rnorm(1:1000), q=.50)

[Package StabPerf version 0.5 Index]