Type: | Package |
Title: | Computing Letter Values |
Version: | 0.2.1 |
Maintainer: | Gilberto Sassi <sassi.pereira.gilberto@gmail.com> |
Imports: | tibble, glue, purrr, stats |
Description: | Letter Values for the course Exploratory Data Analysis at Federal University of Bahia (Brazil). The approach implemented in the package is presented in the textbook of Tukey (1977) <ISBN: 978-0201076165>. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
NeedsCompilation: | no |
Packaged: | 2023-10-01 15:56:14 UTC; gilberto |
Author: | Gilberto Sassi [aut, cre] |
Repository: | CRAN |
Date/Publication: | 2023-10-01 16:20:09 UTC |
Compute Letter Value.
Description
letter_value
returns the letter values until the level indicated by level
.
Usage
letter_value(x, level = 2, na_rm = TRUE)
Arguments
x |
numeric vector |
level |
integer value between 2 and 9 indicating the level to compute the letter values. Default value is 2. |
na_rm |
a logical evaluating to |
Details
This function computes the letter values as presented at Understanding Robust and Exploratory Data Analysis by Hoaglin, Mosteller and Tukey published in 1983.
Value
a list
object is returned with the variable name (variable_name
), the sample (sample
), and a data frame with the following columns:
- letter
a letter indicating the letter value
- depth
depth of the letter value
- lv_lower
lower letter value
- lv_upper
upper letter value
Examples
letter_value(rivers)
Display Letter Values.
Description
Display and return letter values.
Usage
## S3 method for class 'lv'
print(x, ...)
Arguments
x |
an object |
... |
further arguments passed to or from other methods. |
Details
The diagram is, by default, the 5-number summary, where the sample size, the median (location measure) and the F-spread (distance between lower fourth and upper fourth). Others diagrams are avalaible increasing the argument level
.
This function computes the letter values as presented at Understanding Robust and Exploratory Data Analysis by Hoaglin, Mosteller and Tukey published in 1983.
This is a generic print method for the class "lv".
Value
No return value, called to improve visualization of letter values as proposed at the seminal book Understanding Robust and Exploratory Data Analysis by Hoaglin, Mosteller and Tukey published of 1983.
Examples
lv_obj <- letter_value(rivers)
print.lv(lv_obj)
Summary Using Letter Value
Description
Compute the resume measures (location and scale) using letter values.
Usage
## S3 method for class 'lv'
summary(object, ..., coef = 1.5)
Arguments
object |
an object |
... |
further arguments passed to or from other methods. |
coef |
Length of the whiskers as multiple of IQR. Defaults to 1. |
Details
In this summary, we present the trimean, median, F-spread, F-pseudo sigma, F-pseudo variance e outliers values.
This function returns the measures of location and scale as presented at Understanding Robust and Exploratory Data Analysis by Hoaglin, Mosteller and Tukey published in 1983.
This is a generic method for the class "lv".
Value
A tibble
object with the following columns:
- trimean
resistant measure to small changes in the dataset for location.
- median
resistant measure to small changes in the datase for location.
- f_spread
resistant measure to small changes in the dataset for scale.
- f_pesudo_sigma
resistant measure to small changes in the dataset for location. For a normal distribution, this measure is equal to populational statndard deviation.
- f_pseudo_variance
squared valued of
f_pseudo_sigma
.- outliers
values outside whiskers.
Examples
lv_obj <- letter_value(rivers)
summary.lv(lv_obj)