Package 'wodds'

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

Help Index


Get depth from sample size

Description

Calculates the depth given a sample size and alpha level

Usage

get_depth_from_n(n, alpha = 0.05)

Arguments

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

Value

an integer depth

Examples

get_depth_from_n(1e4L, 0.05)

Get sample size from depth

Description

Calculates the sample size needed given an alpha level and depth

Usage

get_n_from_depth(d, alpha = 0.05, conservative = TRUE)

Arguments

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.

Value

a float sample size

Examples

get_n_from_depth(7L, 0.01)

make_wodd_name

Description

make_wodd_name a private function

Usage

make_wodd_name(index)

Arguments

index

int

Value

A vector


raw_wodd

Description

raw_wodd a private function

Usage

raw_wodd(index)

Arguments

index

int

Value

A vector


select_wodd_name_from_table

Description

select_wodd_name_from_table a private function

Usage

select_wodd_name_from_table(index)

Arguments

index

int

Value

A vector

Examples

select_wodd_name_from_table(1L)

wodd_format

Description

wodd_format a private function

Usage

wodd_format(wodd_name)

Arguments

wodd_name

string. "S0", "S1", "M". etc

Value

A string


Calculate whisker odds

Description

makes whisker odds

Usage

wodds(
  y,
  alpha = 0.05,
  include_tail_area = FALSE,
  include_outliers = FALSE,
  include_depth = FALSE
)

Arguments

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

Value

A dataframe of wodds

lower_value

lower value

wodd_name

Name of wodd

upper_value

upper value

Examples

set.seed(42)
wodds(rnorm(1e4, 0, 1))