| interval_position | R Documentation |
Functions to compute position and scale statistics for interval-valued data.
int_median(x, var_name, method = "CM", ...)
int_quantile(x, var_name, probs = c(0.25, 0.5, 0.75), method = "CM", ...)
int_range(x, var_name, method = "CM", ...)
int_iqr(x, var_name, method = "CM", ...)
int_mad(x, var_name, method = "CM", ...)
int_mode(x, var_name, method = "CM", breaks = 30, ...)
x |
interval-valued data with symbolic_tbl class. |
var_name |
the variable name or the column location (multiple variables are allowed). |
method |
methods to calculate statistics: CM (default), VM, QM, SE, FV, EJD, GQ, SPT. |
... |
additional parameters |
probs |
numeric vector of probabilities with values in [0,1]. |
breaks |
number of histogram breaks for mode estimation (default: 30). |
These functions provide position and scale measures:
int_median: Median of interval data
int_quantile: Quantiles of interval data
int_range: Range (max - min) of interval data
int_iqr: Interquartile range (Q3 - Q1)
int_mad: Median absolute deviation
int_mode: Mode of interval data (estimated via histogram)
A numeric matrix or value
Han-Ming Wu
int_mean int_var int_median int_quantile
data(mushroom.int)
# Calculate median
int_median(mushroom.int, var_name = "Pileus.Cap.Width")
int_median(mushroom.int, var_name = 2:3, method = c("CM", "EJD"))
# Calculate quantiles
int_quantile(mushroom.int, var_name = 2, probs = c(0.25, 0.5, 0.75))
# Calculate interquartile range
int_iqr(mushroom.int, var_name = c("Stipe.Length", "Stipe.Thickness"))
# Calculate range
int_range(mushroom.int, var_name = "Pileus.Cap.Width")
# Calculate MAD
int_mad(mushroom.int, var_name = 2:3, method = "CM")
# Estimate mode
int_mode(mushroom.int, var_name = "Stipe.Length", method = "CM")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.