Title: | Calculates Whisker Odds |
---|---|
Description: | Descriptive statistics for large data tend to be low resolution on the tails. Whisker Odds generate a table of descriptive statistics for large data. This is the same as letter-values, but with an alternative naming of depths which allow for depths beyond 26. For a reference to letter-values see Heike Hofmann and Hadley Wickham and Karen Kafadar (2017) <doi:10.1080/10618600.2017.1305277> |
Authors: | Alex Hallam [aut, cre], R. Cody Heimberger [ctb] |
Maintainer: | Alex Hallam <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-11-06 02:55:27 UTC |
Source: | https://github.com/alexhallam/wodds |
Calculates the depth given a sample size and alpha level
get_depth_from_n(n, alpha = 0.05)
get_depth_from_n(n, alpha = 0.05)
n |
an integer scalar sample size |
alpha |
alpha level such as 0.1, 0.05, 0.01. An alpha of 0.05 would be associated with a 95 percent confidence interval |
an integer depth
get_depth_from_n(1e4L, 0.05)
get_depth_from_n(1e4L, 0.05)
Calculates the sample size needed given an alpha level and depth
get_n_from_depth(d, alpha = 0.05, conservative = TRUE)
get_n_from_depth(d, alpha = 0.05, conservative = TRUE)
d |
an integer depth |
alpha |
alpha level such as 0.1, 0.05, 0.01. An alpha of 0.05 would be associated with a 95 percent confidence interval |
conservative |
a bool. default is FALSE. If TRUE then a conservative (larger) sample size is returned. |
a float sample size
get_n_from_depth(7L, 0.01)
get_n_from_depth(7L, 0.01)
make_wodd_name a private function
make_wodd_name(index)
make_wodd_name(index)
index |
int |
A vector
raw_wodd a private function
raw_wodd(index)
raw_wodd(index)
index |
int |
A vector
select_wodd_name_from_table a private function
select_wodd_name_from_table(index)
select_wodd_name_from_table(index)
index |
int |
A vector
select_wodd_name_from_table(1L)
select_wodd_name_from_table(1L)
wodd_format a private function
wodd_format(wodd_name)
wodd_format(wodd_name)
wodd_name |
string. "S0", "S1", "M". etc |
A string
makes whisker odds
wodds( y, alpha = 0.05, include_tail_area = FALSE, include_outliers = FALSE, include_depth = FALSE )
wodds( y, alpha = 0.05, include_tail_area = FALSE, include_outliers = FALSE, include_depth = FALSE )
y |
A vector of values |
alpha |
the alpha level, such as 0.05 which is the compliment of the confidence interval, such as 0.95 |
include_tail_area |
a binary. If true then include a column of tail area 2^(i) |
include_outliers |
a binary. If true include a column of outliers beyond the last wodd depth |
include_depth |
a binary. If true include a column indicating the depth of the letter value |
A dataframe of wodds
lower_value |
lower value |
wodd_name |
Name of wodd |
upper_value |
upper value |
set.seed(42) wodds(rnorm(1e4, 0, 1))
set.seed(42) wodds(rnorm(1e4, 0, 1))