diff --git a/NEWS.md b/NEWS.md index 7f766ef0..5f2a94f8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -15,8 +15,8 @@ None None ## New Features -1. Fix #405 - Add function `quantile_normalization()` to normalize data using quantiles. -2. Fix #409 - Add function `check_duplilcate_rows()` to check for duplicate rows in a data frame. +1. Fix #405 - Add function `quantile_normalize()` to normalize data using quantiles. +2. Fix #409 - Add function `check_duplicate_rows()` to check for duplicate rows in a data frame. 3. Fix #414 - Add function `util_chisquare_param_estimate()` to estimate the parameters of the chi-square distribution. 4. Fix #417 - Add function `tidy_mcmc_sampling()` to sample from a distribution using MCMC. This outputs the function sampled data and a diagnostic plot. diff --git a/docs/index.html b/docs/index.html index 918bf8f5..a7396f30 100644 --- a/docs/index.html +++ b/docs/index.html @@ -99,7 +99,7 @@
# install.packages("devtools")
-devtools::install_github("spsanderson/TidyDensity")
quantile_normalization()
to normalize data using quantiles.check_duplilcate_rows()
to check for duplicate rows in a data frame.quantile_normalize()
to normalize data using quantiles.check_duplicate_rows()
to check for duplicate rows in a data frame.util_chisquare_param_estimate()
to estimate the parameters of the chi-square distribution.tidy_mcmc_sampling()
to sample from a distribution using MCMC. This outputs the function sampled data and a diagnostic plot.util_dist_aic()
functions to calculate the AIC for a distribution.cvar()
and csd()
to a vectorized approach from @kokbent which speeds these up by over 100xtidy_
distribution functions to generate data using data.table
this in many instances has resulted in a speed up of 30% or more.dplyr::cur_data()
as it was deprecated in dplyr in favor of using dplyr::pick()
+dplyr::cur_data()
as it was deprecated in dplyr in favor of using dplyr::pick()
tidy_triangular()
to all autoplot functions.tidy_multi_dist_autoplot()
the .plot_type = "quantile"
did not work.tidy_distribution_summary_tbl()
purrr::compact()
on the list of distributions passed in order to prevent the issue occurring in #212purrr::compact()
on the list of distributions passed in order to prevent the issue occurring in #212tidy_distribution_comparison()
more robust in terms of handling bad or erroneous data.tidy_multi_single_dist()
which helps it to work with other functions like tidy_random_walk()
A function to return the cumulative mean of a vector. It uses dplyr::cummean()
+
A function to return the cumulative mean of a vector. It uses dplyr::cummean()
as the basis of the function.
ggplot2::geom_rug()
A Boolean value of TRUE/FALSE, FALSE is the default. TRUE
-will return the use of ggplot2::geom_smooth()
The aes
parameter of group is
+will return the use of ggplot2::geom_smooth()
The aes
parameter of group is
set to FALSE. This ensures a single smoothing band returned with SE also set to
FALSE. Color is set to 'black' and linetype
is 'dashed'.
A Boolean value of TRUE/FALSE, FALSE is the default. TRUE
-will return the use of ggplot2::geom_jitter()
ggplot2::geom_jitter()
ggplot2::geom_rug()
A Boolean value of TRUE/FALSE, FALSE is the default. TRUE
-will return the use of ggplot2::geom_smooth()
The aes
parameter of group is
+will return the use of ggplot2::geom_smooth()
The aes
parameter of group is
set to FALSE. This ensures a single smoothing band returned with SE also set to
FALSE. Color is set to 'black' and linetype
is 'dashed'.
A Boolean value of TRUE/FALSE, FALSE is the default. TRUE
-will return the use of ggplot2::geom_jitter()
ggplot2::geom_jitter()
dplyr::select()
.
+This is the grouping variable that gets passed to dplyr::group_by()
+and dplyr::select()
.
ggplot2::geom_rug()
A Boolean value of TRUE/FALSE, FALSE is the default. TRUE
-will return the use of ggplot2::geom_smooth()
The aes
parameter of group is
+will return the use of ggplot2::geom_smooth()
The aes
parameter of group is
set to FALSE. This ensures a single smoothing band returned with SE also set to
FALSE. Color is set to 'black' and linetype
is 'dashed'.
A Boolean value of TRUE/FALSE, FALSE is the default. TRUE
-will return the use of ggplot2::geom_jitter()
ggplot2::geom_jitter()
ggplot2::geom_rug()
A Boolean value of TRUE/FALSE, FALSE is the default. TRUE
-will return the use of ggplot2::geom_smooth()
The aes
parameter of group is
+will return the use of ggplot2::geom_smooth()
The aes
parameter of group is
set to FALSE. This ensures a single smoothing band returned with SE also set to
FALSE. Color is set to 'black' and linetype
is 'dashed'.
A Boolean value of TRUE/FALSE, FALSE is the default. TRUE
-will return the use of ggplot2::geom_jitter()
ggplot2::geom_jitter()
ggplot2::geom_rug()
A Boolean value of TRUE/FALSE, FALSE is the default. TRUE
-will return the use of ggplot2::geom_smooth()
The aes
parameter of group is
+will return the use of ggplot2::geom_smooth()
The aes
parameter of group is
set to FALSE. This ensures a single smoothing band returned with SE also set to
FALSE. Color is set to 'black' and linetype
is 'dashed'.
Many tidy eval functions like dplyr::mutate()
or
-dplyr::summarise()
give an automatic name to unnamed inputs. If
+
Many tidy eval functions like dplyr::mutate()
or
+dplyr::summarise()
give an automatic name to unnamed inputs. If
you need to create the same sort of automatic names by yourself,
use as_label()
. For instance, the glue-tunnelling syntax above
can be reproduced manually with:
library(dplyr)
library(ggplot2)
-tb <- tidy_bernoulli(.prob = .1) |> pull(y)
+tb <- tidy_bernoulli(.prob = .1) |> pull(y)
output <- util_bernoulli_param_estimate(tb)
output$parameter_tbl
diff --git a/docs/reference/util_burr_param_estimate.html b/docs/reference/util_burr_param_estimate.html
index c7901f5f..814288e0 100644
--- a/docs/reference/util_burr_param_estimate.html
+++ b/docs/reference/util_burr_param_estimate.html
@@ -136,7 +136,7 @@ Exampleslibrary(dplyr)
library(ggplot2)
-tb <- tidy_burr(.shape1 = 1, .shape2 = 2, .rate = .3) |> pull(y)
+tb <- tidy_burr(.shape1 = 1, .shape2 = 2, .rate = .3) |> pull(y)
output <- util_burr_param_estimate(tb)
output$parameter_tbl
diff --git a/docs/reference/util_chisquare_param_estimate.html b/docs/reference/util_chisquare_param_estimate.html
index 8f7400f4..0afa2d4a 100644
--- a/docs/reference/util_chisquare_param_estimate.html
+++ b/docs/reference/util_chisquare_param_estimate.html
@@ -172,7 +172,7 @@ Exampleslibrary(dplyr)
library(ggplot2)
-tc <- tidy_chisquare(.n = 500, .df = 6, .ncp = 1) |> pull(y)
+tc <- tidy_chisquare(.n = 500, .df = 6, .ncp = 1) |> pull(y)
output <- util_chisquare_param_estimate(tc)
#> Warning: NaNs produced
#> Warning: NaNs produced
diff --git a/docs/reference/util_exponential_param_estimate.html b/docs/reference/util_exponential_param_estimate.html
index bc2f5d85..755082d8 100644
--- a/docs/reference/util_exponential_param_estimate.html
+++ b/docs/reference/util_exponential_param_estimate.html
@@ -134,7 +134,7 @@ Exampleslibrary(dplyr)
library(ggplot2)
-te <- tidy_exponential(.rate = .1) |> pull(y)
+te <- tidy_exponential(.rate = .1) |> pull(y)
output <- util_exponential_param_estimate(te)
output$parameter_tbl
diff --git a/docs/reference/util_gamma_param_estimate.html b/docs/reference/util_gamma_param_estimate.html
index e57b91ce..8f44b6b0 100644
--- a/docs/reference/util_gamma_param_estimate.html
+++ b/docs/reference/util_gamma_param_estimate.html
@@ -134,7 +134,7 @@ Exampleslibrary(dplyr)
library(ggplot2)
-tg <- tidy_gamma(.shape = 1, .scale = .3) |> pull(y)
+tg <- tidy_gamma(.shape = 1, .scale = .3) |> pull(y)
output <- util_gamma_param_estimate(tg)
output$parameter_tbl
diff --git a/docs/reference/util_geometric_param_estimate.html b/docs/reference/util_geometric_param_estimate.html
index 0afa0561..089e6401 100644
--- a/docs/reference/util_geometric_param_estimate.html
+++ b/docs/reference/util_geometric_param_estimate.html
@@ -136,7 +136,7 @@ Exampleslibrary(dplyr)
library(ggplot2)
-tg <- tidy_geometric(.prob = .1) |> pull(y)
+tg <- tidy_geometric(.prob = .1) |> pull(y)
output <- util_geometric_param_estimate(tg)
output$parameter_tbl
diff --git a/docs/reference/util_lognormal_param_estimate.html b/docs/reference/util_lognormal_param_estimate.html
index fd396e13..6d2624c7 100644
--- a/docs/reference/util_lognormal_param_estimate.html
+++ b/docs/reference/util_lognormal_param_estimate.html
@@ -157,7 +157,7 @@ Examples tidy_combined_autoplot()
-tb <- tidy_lognormal(.meanlog = 2, .sdlog = 1) |> pull(y)
+tb <- tidy_lognormal(.meanlog = 2, .sdlog = 1) |> pull(y)
util_lognormal_param_estimate(tb)$parameter_tbl
#> # A tibble: 2 × 8
#> dist_type samp_size min max method mean_log sd_log shape_ratio
diff --git a/docs/reference/util_pareto_param_estimate.html b/docs/reference/util_pareto_param_estimate.html
index 1313a218..a123ed2f 100644
--- a/docs/reference/util_pareto_param_estimate.html
+++ b/docs/reference/util_pareto_param_estimate.html
@@ -160,7 +160,7 @@ Examples tidy_combined_autoplot()
-t <- tidy_pareto(50, 1, 1) |> pull(y)
+t <- tidy_pareto(50, 1, 1) |> pull(y)
util_pareto_param_estimate(t)$parameter_tbl
#> # A tibble: 2 × 8
#> dist_type samp_size min max method shape scale shape_ratio
diff --git a/docs/search.json b/docs/search.json
index 282f5cca..eb7926bc 100644
--- a/docs/search.json
+++ b/docs/search.json
@@ -1 +1 @@
-[{"path":"https://www.spsanderson.com/TidyDensity/articles/getting-started.html","id":"example","dir":"Articles","previous_headings":"","what":"Example","title":"Getting Started with TidyDensity","text":"basic example shows easy generate data TidyDensity: example plot tidy_normal data. can also take look plots number simulations greater nine. automatically turn legend become noisy.","code":"library(TidyDensity) library(dplyr) library(ggplot2) tidy_normal() #> # A tibble: 50 × 7 #> sim_number x y dx dy p q #> #> 1 1 1 -1.40 -3.47 0.000263 0.0808 -1.40 #> 2 1 2 0.255 -3.32 0.000879 0.601 0.255 #> 3 1 3 -2.44 -3.17 0.00246 0.00740 -2.44 #> 4 1 4 -0.00557 -3.02 0.00581 0.498 -0.00557 #> 5 1 5 0.622 -2.88 0.0118 0.733 0.622 #> 6 1 6 1.15 -2.73 0.0209 0.875 1.15 #> 7 1 7 -1.82 -2.58 0.0338 0.0342 -1.82 #> 8 1 8 -0.247 -2.43 0.0513 0.402 -0.247 #> 9 1 9 -0.244 -2.28 0.0742 0.404 -0.244 #> 10 1 10 -0.283 -2.14 0.102 0.389 -0.283 #> # ℹ 40 more rows tn <- tidy_normal(.n = 100, .num_sims = 6) tidy_autoplot(tn, .plot_type = \"density\") tidy_autoplot(tn, .plot_type = \"quantile\") tidy_autoplot(tn, .plot_type = \"probability\") tidy_autoplot(tn, .plot_type = \"qq\") tn <- tidy_normal(.n = 100, .num_sims = 20) tidy_autoplot(tn, .plot_type = \"density\") tidy_autoplot(tn, .plot_type = \"quantile\") tidy_autoplot(tn, .plot_type = \"probability\") tidy_autoplot(tn, .plot_type = \"qq\")"},{"path":"https://www.spsanderson.com/TidyDensity/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Steven Sanderson. Author, maintainer, copyright holder.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Sanderson S (2024). TidyDensity: Functions Tidy Analysis Generation Random Data. R package version 1.4.0.9000, https://github.com/spsanderson/TidyDensity.","code":"@Manual{, title = {TidyDensity: Functions for Tidy Analysis and Generation of Random Data}, author = {Steven Sanderson}, year = {2024}, note = {R package version 1.4.0.9000}, url = {https://github.com/spsanderson/TidyDensity}, }"},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://www.spsanderson.com/TidyDensity/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement spsanderson@gmail.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://www.spsanderson.com/TidyDensity/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.0, available https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/index.html","id":"tidydensity-","dir":"","previous_headings":"","what":"Functions for Tidy Analysis and Generation of Random Data","title":"Functions for Tidy Analysis and Generation of Random Data","text":"goal TidyDensity make working random numbers different distributions easy. tidy_ distribution functions provide following components: [r_] [d_] [q_] [p_]","code":""},{"path":"https://www.spsanderson.com/TidyDensity/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Functions for Tidy Analysis and Generation of Random Data","text":"can install released version TidyDensity CRAN : development version GitHub :","code":"install.packages(\"TidyDensity\") # install.packages(\"devtools\") devtools::install_github(\"spsanderson/TidyDensity\")"},{"path":"https://www.spsanderson.com/TidyDensity/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"Functions for Tidy Analysis and Generation of Random Data","text":"basic example shows solve common problem: example plot tidy_normal data. can also take look plots number simulations greater nine. automatically turn legend become noisy.","code":"library(TidyDensity) library(dplyr) library(ggplot2) tidy_normal() #> # A tibble: 50 × 7 #> sim_number x y dx dy p q #> #> 1 1 1 0.227 -2.97 0.000238 0.590 0.227 #> 2 1 2 1.12 -2.84 0.000640 0.869 1.12 #> 3 1 3 1.26 -2.71 0.00153 0.897 1.26 #> 4 1 4 0.204 -2.58 0.00326 0.581 0.204 #> 5 1 5 1.04 -2.44 0.00620 0.852 1.04 #> 6 1 6 -0.180 -2.31 0.0106 0.429 -0.180 #> 7 1 7 0.299 -2.18 0.0167 0.618 0.299 #> 8 1 8 1.73 -2.04 0.0243 0.959 1.73 #> 9 1 9 -0.770 -1.91 0.0338 0.221 -0.770 #> 10 1 10 0.385 -1.78 0.0463 0.650 0.385 #> # ℹ 40 more rows tn <- tidy_normal(.n = 100, .num_sims = 6) tidy_autoplot(tn, .plot_type = \"density\") tidy_autoplot(tn, .plot_type = \"quantile\") tidy_autoplot(tn, .plot_type = \"probability\") tidy_autoplot(tn, .plot_type = \"qq\") tn <- tidy_normal(.n = 100, .num_sims = 20) tidy_autoplot(tn, .plot_type = \"density\") tidy_autoplot(tn, .plot_type = \"quantile\") tidy_autoplot(tn, .plot_type = \"probability\") tidy_autoplot(tn, .plot_type = \"qq\")"},{"path":"https://www.spsanderson.com/TidyDensity/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2022 Steven Paul Sandeson II, MPH Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_density_augment.html","id":null,"dir":"Reference","previous_headings":"","what":"Bootstrap Density Tibble — bootstrap_density_augment","title":"Bootstrap Density Tibble — bootstrap_density_augment","text":"Add density information output tidy_bootstrap(), bootstrap_unnest_tbl().","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_density_augment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bootstrap Density Tibble — bootstrap_density_augment","text":"","code":"bootstrap_density_augment(.data)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_density_augment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bootstrap Density Tibble — bootstrap_density_augment","text":".data data passed tidy_bootstrap() bootstrap_unnest_tbl() functions.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_density_augment.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bootstrap Density Tibble — bootstrap_density_augment","text":"tibble","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_density_augment.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Bootstrap Density Tibble — bootstrap_density_augment","text":"function takes input output tidy_bootstrap() bootstrap_unnest_tbl() returns augmented tibble following columns added : x, y, dx, dy. looks attribute comes using tidy_bootstrap() bootstrap_unnest_tbl() work unless data comes one functions.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_density_augment.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Bootstrap Density Tibble — bootstrap_density_augment","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_density_augment.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Bootstrap Density Tibble — bootstrap_density_augment","text":"","code":"x <- mtcars$mpg tidy_bootstrap(x) |> bootstrap_density_augment() #> # A tibble: 50,000 × 5 #> sim_number x y dx dy #> #> 1 1 1 17.3 6.48 0.000412 #> 2 1 2 15.2 7.33 0.00231 #> 3 1 3 16.4 8.17 0.00856 #> 4 1 4 15 9.01 0.0209 #> 5 1 5 18.7 9.86 0.0340 #> 6 1 6 18.1 10.7 0.0376 #> 7 1 7 10.4 11.5 0.0316 #> 8 1 8 10.4 12.4 0.0286 #> 9 1 9 15 13.2 0.0391 #> 10 1 10 21.4 14.1 0.0607 #> # ℹ 49,990 more rows tidy_bootstrap(x) |> bootstrap_unnest_tbl() |> bootstrap_density_augment() #> # A tibble: 50,000 × 5 #> sim_number x y dx dy #> #> 1 1 1 14.7 6.80 0.000150 #> 2 1 2 21.5 8.08 0.00206 #> 3 1 3 19.2 9.36 0.00914 #> 4 1 4 26 10.6 0.0131 #> 5 1 5 22.8 11.9 0.00739 #> 6 1 6 15 13.2 0.0114 #> 7 1 7 19.2 14.5 0.0272 #> 8 1 8 21 15.8 0.0365 #> 9 1 9 21 17.0 0.0609 #> 10 1 10 17.3 18.3 0.0977 #> # ℹ 49,990 more rows"},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_p_augment.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment Bootstrap P — bootstrap_p_augment","title":"Augment Bootstrap P — bootstrap_p_augment","text":"Takes numeric vector return ecdf probability.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_p_augment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment Bootstrap P — bootstrap_p_augment","text":"","code":"bootstrap_p_augment(.data, .value, .names = \"auto\")"},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_p_augment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment Bootstrap P — bootstrap_p_augment","text":".data data passed augmented function. .value passed rlang::enquo() capture vectors want augment. .names default \"auto\"","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_p_augment.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment Bootstrap P — bootstrap_p_augment","text":"augmented tibble","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_p_augment.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment Bootstrap P — bootstrap_p_augment","text":"Takes numeric vector return ecdf probability vector. function intended used order add columns tibble.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_p_augment.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Augment Bootstrap P — bootstrap_p_augment","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_p_augment.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment Bootstrap P — bootstrap_p_augment","text":"","code":"x <- mtcars$mpg tidy_bootstrap(x) |> bootstrap_unnest_tbl() |> bootstrap_p_augment(y) #> # A tibble: 50,000 × 3 #> sim_number y p #> #> 1 1 21.4 0.687 #> 2 1 21.5 0.716 #> 3 1 18.7 0.467 #> 4 1 30.4 0.936 #> 5 1 13.3 0.0944 #> 6 1 21.5 0.716 #> 7 1 19.2 0.529 #> 8 1 19.2 0.529 #> 9 1 21.4 0.687 #> 10 1 21.4 0.687 #> # ℹ 49,990 more rows"},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_p_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Bootstrap P of a Vector — bootstrap_p_vec","title":"Compute Bootstrap P of a Vector — bootstrap_p_vec","text":"function takes vector input return ecdf probability vector.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_p_vec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Bootstrap P of a Vector — bootstrap_p_vec","text":"","code":"bootstrap_p_vec(.x)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_p_vec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Bootstrap P of a Vector — bootstrap_p_vec","text":".x numeric","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_p_vec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute Bootstrap P of a Vector — bootstrap_p_vec","text":"vector","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_p_vec.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute Bootstrap P of a Vector — bootstrap_p_vec","text":"function return ecdf probability vector.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_p_vec.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute Bootstrap P of a Vector — bootstrap_p_vec","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_p_vec.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute Bootstrap P of a Vector — bootstrap_p_vec","text":"","code":"x <- mtcars$mpg bootstrap_p_vec(x) #> [1] 0.62500 0.62500 0.78125 0.68750 0.46875 0.43750 0.12500 0.81250 0.78125 #> [10] 0.53125 0.40625 0.34375 0.37500 0.25000 0.06250 0.06250 0.15625 0.96875 #> [19] 0.93750 1.00000 0.71875 0.28125 0.25000 0.09375 0.53125 0.87500 0.84375 #> [28] 0.93750 0.31250 0.56250 0.18750 0.68750"},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_q_augment.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment Bootstrap Q — bootstrap_q_augment","title":"Augment Bootstrap Q — bootstrap_q_augment","text":"Takes numeric vector return quantile.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_q_augment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment Bootstrap Q — bootstrap_q_augment","text":"","code":"bootstrap_q_augment(.data, .value, .names = \"auto\")"},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_q_augment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment Bootstrap Q — bootstrap_q_augment","text":".data data passed augmented function. .value passed rlang::enquo() capture vectors want augment. .names default \"auto\"","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_q_augment.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment Bootstrap Q — bootstrap_q_augment","text":"augmented tibble","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_q_augment.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment Bootstrap Q — bootstrap_q_augment","text":"Takes numeric vector return quantile vector. function intended used order add columns tibble.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_q_augment.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Augment Bootstrap Q — bootstrap_q_augment","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_q_augment.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment Bootstrap Q — bootstrap_q_augment","text":"","code":"x <- mtcars$mpg tidy_bootstrap(x) |> bootstrap_unnest_tbl() |> bootstrap_q_augment(y) #> # A tibble: 50,000 × 3 #> sim_number y q #> #> 1 1 21 10.4 #> 2 1 10.4 10.4 #> 3 1 21.4 10.4 #> 4 1 30.4 10.4 #> 5 1 30.4 10.4 #> 6 1 15.2 10.4 #> 7 1 21.5 10.4 #> 8 1 33.9 10.4 #> 9 1 18.1 10.4 #> 10 1 21 10.4 #> # ℹ 49,990 more rows"},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_q_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Bootstrap Q of a Vector — bootstrap_q_vec","title":"Compute Bootstrap Q of a Vector — bootstrap_q_vec","text":"function takes vector input return quantile vector.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_q_vec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Bootstrap Q of a Vector — bootstrap_q_vec","text":"","code":"bootstrap_q_vec(.x)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_q_vec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Bootstrap Q of a Vector — bootstrap_q_vec","text":".x numeric","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_q_vec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute Bootstrap Q of a Vector — bootstrap_q_vec","text":"vector","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_q_vec.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute Bootstrap Q of a Vector — bootstrap_q_vec","text":"function return quantile vector.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_q_vec.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute Bootstrap Q of a Vector — bootstrap_q_vec","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_q_vec.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute Bootstrap Q of a Vector — bootstrap_q_vec","text":"","code":"x <- mtcars$mpg bootstrap_q_vec(x) #> [1] 10.4 10.4 13.3 14.3 14.7 15.0 15.2 15.2 15.5 15.8 16.4 17.3 17.8 18.1 18.7 #> [16] 19.2 19.2 19.7 21.0 21.0 21.4 21.4 21.5 22.8 22.8 24.4 26.0 27.3 30.4 30.4 #> [31] 32.4 33.9"},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_stat_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Bootstrap Stat Plot — bootstrap_stat_plot","title":"Bootstrap Stat Plot — bootstrap_stat_plot","text":"function produces plot cumulative statistic function applied bootstrap variable tidy_bootstrap() bootstrap_unnest_tbl() applied .","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_stat_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bootstrap Stat Plot — bootstrap_stat_plot","text":"","code":"bootstrap_stat_plot( .data, .value, .stat = \"cmean\", .show_groups = FALSE, .show_ci_labels = TRUE, .interactive = FALSE )"},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_stat_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bootstrap Stat Plot — bootstrap_stat_plot","text":".data data comes either tidy_bootstrap() bootstrap_unnest_tbl() applied . .value value column calculations applied . .stat cumulative statistic function applied .value column. must quoted. default \"cmean\". .show_groups default FALSE, set TRUE get output simulations bootstrap data. .show_ci_labels default TRUE, show last value upper lower quantile. .interactive default FALSE, set TRUE get plotly plot object back.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_stat_plot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bootstrap Stat Plot — bootstrap_stat_plot","text":"plot either ggplot2 plotly.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_stat_plot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Bootstrap Stat Plot — bootstrap_stat_plot","text":"function take data either tidy_bootstrap() directly apply bootstrap_unnest_tbl() output. several different cumulative functions can applied data.accepted values : \"cmean\" - Cumulative Mean \"chmean\" - Cumulative Harmonic Mean \"cgmean\" - Cumulative Geometric Mean \"csum\" = Cumulative Sum \"cmedian\" = Cumulative Median \"cmax\" = Cumulative Max \"cmin\" = Cumulative Min \"cprod\" = Cumulative Product \"csd\" = Cumulative Standard Deviation \"cvar\" = Cumulative Variance \"cskewness\" = Cumulative Skewness \"ckurtosis\" = Cumulative Kurtotsis","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_stat_plot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Bootstrap Stat Plot — bootstrap_stat_plot","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_stat_plot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Bootstrap Stat Plot — bootstrap_stat_plot","text":"","code":"x <- mtcars$mpg tidy_bootstrap(x) |> bootstrap_stat_plot(y, \"cmean\") tidy_bootstrap(x, .num_sims = 10) |> bootstrap_stat_plot(y, .stat = \"chmean\", .show_groups = TRUE, .show_ci_label = FALSE ) #> Warning: Setting '.num_sims' to less than 2000 means that results can be potentially #> unstable. Consider setting to 2000 or more."},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_unnest_tbl.html","id":null,"dir":"Reference","previous_headings":"","what":"Unnest Tidy Bootstrap Tibble — bootstrap_unnest_tbl","title":"Unnest Tidy Bootstrap Tibble — bootstrap_unnest_tbl","text":"Unnest data output tidy_bootstrap().","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_unnest_tbl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Unnest Tidy Bootstrap Tibble — bootstrap_unnest_tbl","text":"","code":"bootstrap_unnest_tbl(.data)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_unnest_tbl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Unnest Tidy Bootstrap Tibble — bootstrap_unnest_tbl","text":".data data passed tidy_bootstrap() function.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_unnest_tbl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Unnest Tidy Bootstrap Tibble — bootstrap_unnest_tbl","text":"tibble","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_unnest_tbl.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Unnest Tidy Bootstrap Tibble — bootstrap_unnest_tbl","text":"function takes input output tidy_bootstrap() function returns two column tibble. columns sim_number y looks attribute comes using tidy_bootstrap() work unless data comes function.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_unnest_tbl.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Unnest Tidy Bootstrap Tibble — bootstrap_unnest_tbl","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/bootstrap_unnest_tbl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Unnest Tidy Bootstrap Tibble — bootstrap_unnest_tbl","text":"","code":"tb <- tidy_bootstrap(.x = mtcars$mpg) bootstrap_unnest_tbl(tb) #> # A tibble: 50,000 × 2 #> sim_number y #> #> 1 1 21.4 #> 2 1 21 #> 3 1 26 #> 4 1 19.7 #> 5 1 10.4 #> 6 1 15.5 #> 7 1 32.4 #> 8 1 22.8 #> 9 1 26 #> 10 1 17.3 #> # ℹ 49,990 more rows bootstrap_unnest_tbl(tb) |> tidy_distribution_summary_tbl(sim_number) #> # A tibble: 2,000 × 13 #> sim_number mean_val median_val std_val min_val max_val skewness kurtosis #> #> 1 1 18.3 18.7 5.85 10.4 32.4 0.410 2.75 #> 2 2 19.2 18.1 4.73 10.4 30.4 0.909 3.75 #> 3 3 21.7 19.2 6.68 10.4 33.9 0.689 2.40 #> 4 4 20.3 19.2 5.72 10.4 32.4 0.567 2.46 #> 5 5 20.8 21.4 6.93 10.4 33.9 0.431 2.22 #> 6 6 23.1 21.4 6.97 10.4 33.9 0.00625 1.68 #> 7 7 23.1 21.4 5.94 10.4 33.9 0.119 2.74 #> 8 8 19.5 21 5.84 10.4 33.9 0.349 2.83 #> 9 9 20.1 18.1 6.71 10.4 33.9 0.887 2.75 #> 10 10 19.6 19.2 5.04 10.4 33.9 0.732 3.84 #> # ℹ 1,990 more rows #> # ℹ 5 more variables: range , iqr , variance , ci_low , #> # ci_high "},{"path":"https://www.spsanderson.com/TidyDensity/reference/cgmean.html","id":null,"dir":"Reference","previous_headings":"","what":"Cumulative Geometric Mean — cgmean","title":"Cumulative Geometric Mean — cgmean","text":"function return cumulative geometric mean vector.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cgmean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cumulative Geometric Mean — cgmean","text":"","code":"cgmean(.x)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/cgmean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cumulative Geometric Mean — cgmean","text":".x numeric vector","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cgmean.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cumulative Geometric Mean — cgmean","text":"numeric vector","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cgmean.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cumulative Geometric Mean — cgmean","text":"function return cumulative geometric mean vector. exp(cummean(log(.x)))","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/cgmean.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cumulative Geometric Mean — cgmean","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cgmean.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cumulative Geometric Mean — cgmean","text":"","code":"x <- mtcars$mpg cgmean(x) #> [1] 21.00000 21.00000 21.58363 21.53757 20.93755 20.43547 19.41935 19.98155 #> [9] 20.27666 20.16633 19.93880 19.61678 19.42805 19.09044 18.33287 17.69470 #> [17] 17.50275 18.11190 18.61236 19.17879 19.28342 19.09293 18.90457 18.62961 #> [25] 18.65210 18.92738 19.15126 19.46993 19.33021 19.34242 19.18443 19.25006"},{"path":"https://www.spsanderson.com/TidyDensity/reference/check_duplicate_rows.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for Duplicate Rows in a Data Frame — check_duplicate_rows","title":"Check for Duplicate Rows in a Data Frame — check_duplicate_rows","text":"function checks duplicate rows data frame.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/check_duplicate_rows.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for Duplicate Rows in a Data Frame — check_duplicate_rows","text":"","code":"check_duplicate_rows(.data)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/check_duplicate_rows.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for Duplicate Rows in a Data Frame — check_duplicate_rows","text":".data data frame.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/check_duplicate_rows.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for Duplicate Rows in a Data Frame — check_duplicate_rows","text":"logical vector indicating whether row duplicate .","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/check_duplicate_rows.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check for Duplicate Rows in a Data Frame — check_duplicate_rows","text":"function checks duplicate rows comparing row data frame every row. row identical another row, considered duplicate.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/check_duplicate_rows.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check for Duplicate Rows in a Data Frame — check_duplicate_rows","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/check_duplicate_rows.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check for Duplicate Rows in a Data Frame — check_duplicate_rows","text":"","code":"data <- data.frame( x = c(1, 2, 3, 1), y = c(2, 3, 4, 2), z = c(3, 2, 5, 3) ) check_duplicate_rows(data) #> [1] FALSE TRUE FALSE FALSE"},{"path":"https://www.spsanderson.com/TidyDensity/reference/chmean.html","id":null,"dir":"Reference","previous_headings":"","what":"Cumulative Harmonic Mean — chmean","title":"Cumulative Harmonic Mean — chmean","text":"function return cumulative harmonic mean vector.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/chmean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cumulative Harmonic Mean — chmean","text":"","code":"chmean(.x)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/chmean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cumulative Harmonic Mean — chmean","text":".x numeric vector","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/chmean.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cumulative Harmonic Mean — chmean","text":"numeric vector","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/chmean.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cumulative Harmonic Mean — chmean","text":"function return cumulative harmonic mean vector. 1 / (cumsum(1 / .x))","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/chmean.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cumulative Harmonic Mean — chmean","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/chmean.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cumulative Harmonic Mean — chmean","text":"","code":"x <- mtcars$mpg chmean(x) #> [1] 21.0000000 10.5000000 7.1891892 5.3813575 4.1788087 3.3949947 #> [7] 2.7436247 2.4663044 2.2255626 1.9943841 1.7934398 1.6166494 #> [13] 1.4784877 1.3474251 1.1928760 1.0701322 0.9975150 0.9677213 #> [19] 0.9378663 0.9126181 0.8754572 0.8286539 0.7858140 0.7419753 #> [25] 0.7143688 0.6961523 0.6779989 0.6632076 0.6364908 0.6165699 #> [31] 0.5922267 0.5762786"},{"path":"https://www.spsanderson.com/TidyDensity/reference/ci_hi.html","id":null,"dir":"Reference","previous_headings":"","what":"Confidence Interval Generic — ci_hi","title":"Confidence Interval Generic — ci_hi","text":"Gets upper 97.5% quantile numeric vector.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/ci_hi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Confidence Interval Generic — ci_hi","text":"","code":"ci_hi(.x, .na_rm = FALSE)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/ci_hi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Confidence Interval Generic — ci_hi","text":".x vector numeric values .na_rm Boolean, defaults FALSE. Passed quantile function.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/ci_hi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Confidence Interval Generic — ci_hi","text":"numeric value.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/ci_hi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Confidence Interval Generic — ci_hi","text":"Gets upper 97.5% quantile numeric vector.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/ci_hi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Confidence Interval Generic — ci_hi","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/ci_hi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Confidence Interval Generic — ci_hi","text":"","code":"x <- mtcars$mpg ci_hi(x) #> [1] 32.7375"},{"path":"https://www.spsanderson.com/TidyDensity/reference/ci_lo.html","id":null,"dir":"Reference","previous_headings":"","what":"Confidence Interval Generic — ci_lo","title":"Confidence Interval Generic — ci_lo","text":"Gets lower 2.5% quantile numeric vector.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/ci_lo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Confidence Interval Generic — ci_lo","text":"","code":"ci_lo(.x, .na_rm = FALSE)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/ci_lo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Confidence Interval Generic — ci_lo","text":".x vector numeric values .na_rm Boolean, defaults FALSE. Passed quantile function.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/ci_lo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Confidence Interval Generic — ci_lo","text":"numeric value.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/ci_lo.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Confidence Interval Generic — ci_lo","text":"Gets lower 2.5% quantile numeric vector.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/ci_lo.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Confidence Interval Generic — ci_lo","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/ci_lo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Confidence Interval Generic — ci_lo","text":"","code":"x <- mtcars$mpg ci_lo(x) #> [1] 10.4"},{"path":"https://www.spsanderson.com/TidyDensity/reference/ckurtosis.html","id":null,"dir":"Reference","previous_headings":"","what":"Cumulative Kurtosis — ckurtosis","title":"Cumulative Kurtosis — ckurtosis","text":"function return cumulative kurtosis vector.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/ckurtosis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cumulative Kurtosis — ckurtosis","text":"","code":"ckurtosis(.x)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/ckurtosis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cumulative Kurtosis — ckurtosis","text":".x numeric vector","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/ckurtosis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cumulative Kurtosis — ckurtosis","text":"numeric vector","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/ckurtosis.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cumulative Kurtosis — ckurtosis","text":"function return cumulative kurtosis vector.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/ckurtosis.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cumulative Kurtosis — ckurtosis","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/ckurtosis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cumulative Kurtosis — ckurtosis","text":"","code":"x <- mtcars$mpg ckurtosis(x) #> [1] NaN NaN 1.500000 2.189216 2.518932 1.786006 2.744467 2.724675 #> [9] 2.930885 2.988093 2.690270 2.269038 2.176622 1.992044 2.839430 2.481896 #> [17] 2.356826 3.877115 3.174702 2.896931 3.000743 3.091225 3.182071 3.212816 #> [25] 3.352916 3.015952 2.837139 2.535185 2.595908 2.691103 2.738468 2.799467"},{"path":"https://www.spsanderson.com/TidyDensity/reference/cmean.html","id":null,"dir":"Reference","previous_headings":"","what":"Cumulative Mean — cmean","title":"Cumulative Mean — cmean","text":"function return cumulative mean vector.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cmean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cumulative Mean — cmean","text":"","code":"cmean(.x)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/cmean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cumulative Mean — cmean","text":".x numeric vector","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cmean.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cumulative Mean — cmean","text":"numeric vector","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cmean.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cumulative Mean — cmean","text":"function return cumulative mean vector. uses dplyr::cummean() basis function.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/cmean.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cumulative Mean — cmean","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cmean.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cumulative Mean — cmean","text":"","code":"x <- mtcars$mpg cmean(x) #> [1] 21.00000 21.00000 21.60000 21.55000 20.98000 20.50000 19.61429 20.21250 #> [9] 20.50000 20.37000 20.13636 19.82500 19.63077 19.31429 18.72000 18.20000 #> [17] 17.99412 18.79444 19.40526 20.13000 20.19524 19.98182 19.77391 19.50417 #> [25] 19.49200 19.79231 20.02222 20.39286 20.23448 20.21667 20.04839 20.09062"},{"path":"https://www.spsanderson.com/TidyDensity/reference/cmedian.html","id":null,"dir":"Reference","previous_headings":"","what":"Cumulative Median — cmedian","title":"Cumulative Median — cmedian","text":"function return cumulative median vector.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cmedian.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cumulative Median — cmedian","text":"","code":"cmedian(.x)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/cmedian.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cumulative Median — cmedian","text":".x numeric vector","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cmedian.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cumulative Median — cmedian","text":"numeric vector","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cmedian.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cumulative Median — cmedian","text":"function return cumulative median vector.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/cmedian.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cumulative Median — cmedian","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cmedian.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cumulative Median — cmedian","text":"","code":"x <- mtcars$mpg cmedian(x) #> [1] 21.00 21.00 21.00 21.20 21.00 21.00 21.00 21.00 21.00 21.00 21.00 20.10 #> [13] 19.20 18.95 18.70 18.40 18.10 18.40 18.70 18.95 19.20 18.95 18.70 18.40 #> [25] 18.70 18.95 19.20 19.20 19.20 19.20 19.20 19.20"},{"path":"https://www.spsanderson.com/TidyDensity/reference/color_blind.html","id":null,"dir":"Reference","previous_headings":"","what":"Provide Colorblind Compliant Colors — color_blind","title":"Provide Colorblind Compliant Colors — color_blind","text":"8 Hex RGB color definitions suitable charts colorblind people.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/color_blind.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Provide Colorblind Compliant Colors — color_blind","text":"","code":"color_blind()"},{"path":"https://www.spsanderson.com/TidyDensity/reference/convert_to_ts.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Data to Time Series Format — convert_to_ts","title":"Convert Data to Time Series Format — convert_to_ts","text":"function converts data data frame tibble time series format. designed work data generated tidy_ distribution functions. function can return time series data, pivot long format, .","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/convert_to_ts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Data to Time Series Format — convert_to_ts","text":"","code":"convert_to_ts(.data, .return_ts = TRUE, .pivot_longer = FALSE)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/convert_to_ts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Data to Time Series Format — convert_to_ts","text":".data data frame tibble converted time series format. .return_ts logical value indicating whether return time series data. Default TRUE. .pivot_longer logical value indicating whether pivot data long format. Default FALSE.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/convert_to_ts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Data to Time Series Format — convert_to_ts","text":"function returns processed data based chosen options: ret_ts set TRUE, returns time series data. pivot_longer set TRUE, returns data long format. options set FALSE, returns data tibble.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/convert_to_ts.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert Data to Time Series Format — convert_to_ts","text":"function takes data frame tibble input processes based specified options. performs following actions: Checks input data frame tibble; otherwise, raises error. Checks data comes tidy_ distribution function; otherwise, raises error. Converts data time series format, grouping \"sim_number\" transforming \"y\" column time series. Returns result based chosen options: ret_ts set TRUE, returns time series data. pivot_longer set TRUE, pivots data long format. options set FALSE, returns data tibble.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/convert_to_ts.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert Data to Time Series Format — convert_to_ts","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/convert_to_ts.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Data to Time Series Format — convert_to_ts","text":"","code":"# Example 1: Convert data to time series format without returning time series data x <- tidy_normal() result <- convert_to_ts(x, FALSE) head(result) #> # A tibble: 6 × 1 #> y #> #> 1 1.99 #> 2 0.416 #> 3 -0.362 #> 4 -0.282 #> 5 0.404 #> 6 -0.694 # Example 2: Convert data to time series format and pivot it into long format x <- tidy_normal() result <- convert_to_ts(x, FALSE, TRUE) head(result) #> # A tibble: 6 × 1 #> y #> #> 1 -0.912 #> 2 -0.732 #> 3 -0.582 #> 4 0.204 #> 5 -0.661 #> 6 -2.18 # Example 3: Convert data to time series format and return the time series data x <- tidy_normal() result <- convert_to_ts(x) head(result) #> y #> [1,] -0.1348973 #> [2,] 0.6769697 #> [3,] -0.5048327 #> [4,] -0.8381438 #> [5,] -2.9578102 #> [6,] 1.1051425"},{"path":"https://www.spsanderson.com/TidyDensity/reference/csd.html","id":null,"dir":"Reference","previous_headings":"","what":"Cumulative Standard Deviation — csd","title":"Cumulative Standard Deviation — csd","text":"function return cumulative standard deviation vector.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/csd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cumulative Standard Deviation — csd","text":"","code":"csd(.x)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/csd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cumulative Standard Deviation — csd","text":".x numeric vector","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/csd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cumulative Standard Deviation — csd","text":"numeric vector. Note: first entry always NaN.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/csd.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cumulative Standard Deviation — csd","text":"function return cumulative standard deviation vector.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/csd.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cumulative Standard Deviation — csd","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/csd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cumulative Standard Deviation — csd","text":"","code":"x <- mtcars$mpg csd(x) #> [1] NaN 0.0000000 1.0392305 0.8544004 1.4737707 1.7663522 2.8445436 #> [8] 3.1302385 3.0524580 2.9070986 2.8647069 2.9366416 2.8975233 3.0252418 #> [15] 3.7142967 4.1476098 4.1046423 5.2332053 5.7405452 6.4594362 6.3029736 #> [22] 6.2319940 6.1698105 6.1772007 6.0474457 6.1199296 6.1188444 6.3166405 #> [29] 6.2611772 6.1530527 6.1217574 6.0269481"},{"path":"https://www.spsanderson.com/TidyDensity/reference/cskewness.html","id":null,"dir":"Reference","previous_headings":"","what":"Cumulative Skewness — cskewness","title":"Cumulative Skewness — cskewness","text":"function return cumulative skewness vector.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cskewness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cumulative Skewness — cskewness","text":"","code":"cskewness(.x)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/cskewness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cumulative Skewness — cskewness","text":".x numeric vector","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cskewness.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cumulative Skewness — cskewness","text":"numeric vector","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cskewness.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cumulative Skewness — cskewness","text":"function return cumulative skewness vector.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/cskewness.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cumulative Skewness — cskewness","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cskewness.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cumulative Skewness — cskewness","text":"","code":"x <- mtcars$mpg cskewness(x) #> [1] NaN NaN 0.707106781 0.997869718 -0.502052297 #> [6] -0.258803244 -0.867969171 -0.628239920 -0.808101715 -0.695348960 #> [11] -0.469220594 -0.256323338 -0.091505282 0.002188142 -0.519593266 #> [16] -0.512660692 -0.379598706 0.614549281 0.581410573 0.649357202 #> [21] 0.631855977 0.706212631 0.775750182 0.821447605 0.844413861 #> [26] 0.716010069 0.614326432 0.525141032 0.582528820 0.601075783 #> [31] 0.652552397 0.640439864"},{"path":"https://www.spsanderson.com/TidyDensity/reference/cvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Cumulative Variance — cvar","title":"Cumulative Variance — cvar","text":"function return cumulative variance vector.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cumulative Variance — cvar","text":"","code":"cvar(.x)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/cvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cumulative Variance — cvar","text":".x numeric vector","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cumulative Variance — cvar","text":"numeric vector. Note: first entry always NaN.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cvar.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cumulative Variance — cvar","text":"function return cumulative variance vector. exp(cummean(log(.x)))","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/cvar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cumulative Variance — cvar","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/cvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cumulative Variance — cvar","text":"","code":"x <- mtcars$mpg cvar(x) #> [1] NaN 0.000000 1.080000 0.730000 2.172000 3.120000 8.091429 #> [8] 9.798393 9.317500 8.451222 8.206545 8.623864 8.395641 9.152088 #> [15] 13.796000 17.202667 16.848088 27.386438 32.953860 41.724316 39.727476 #> [22] 38.837749 38.066561 38.157808 36.571600 37.453538 37.440256 39.899947 #> [29] 39.202340 37.860057 37.475914 36.324103"},{"path":"https://www.spsanderson.com/TidyDensity/reference/dist_type_extractor.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Distribution Type from Tidy Distribution Object — dist_type_extractor","title":"Extract Distribution Type from Tidy Distribution Object — dist_type_extractor","text":"Get distribution name title case tidy_ distribution function.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/dist_type_extractor.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Distribution Type from Tidy Distribution Object — dist_type_extractor","text":"","code":"dist_type_extractor(.x)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/dist_type_extractor.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Distribution Type from Tidy Distribution Object — dist_type_extractor","text":".x attribute list passed tidy_ distribution function.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/dist_type_extractor.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Distribution Type from Tidy Distribution Object — dist_type_extractor","text":"character string","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/dist_type_extractor.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Distribution Type from Tidy Distribution Object — dist_type_extractor","text":"extract distribution type tidy_ distribution function output using attributes object. must pass attribute directly function. meant really used internally. passing using manually $tibble_type attribute.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/dist_type_extractor.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Distribution Type from Tidy Distribution Object — dist_type_extractor","text":"Steven P. Sanderson II,","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/dist_type_extractor.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract Distribution Type from Tidy Distribution Object — dist_type_extractor","text":"","code":"tn <- tidy_normal() atb <- attributes(tn) dist_type_extractor(atb$tibble_type) #> [1] \"Gaussian\""},{"path":"https://www.spsanderson.com/TidyDensity/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator — %>%","title":"Pipe operator — %>%","text":"See magrittr::%>% details.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator — %>%","text":"","code":"lhs %>% rhs"},{"path":"https://www.spsanderson.com/TidyDensity/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pipe operator — %>%","text":"lhs value magrittr placeholder. rhs function call using magrittr semantics.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pipe operator — %>%","text":"result calling rhs(lhs).","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/quantile_normalize.html","id":null,"dir":"Reference","previous_headings":"","what":"Perform quantile normalization on a numeric matrix/data.frame — quantile_normalize","title":"Perform quantile normalization on a numeric matrix/data.frame — quantile_normalize","text":"function perform quantile normalization two distributions equal length. Quantile normalization technique used make distribution values across different samples similar. ensures distributions values sample quantiles. function takes numeric matrix input returns quantile-normalized matrix.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/quantile_normalize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Perform quantile normalization on a numeric matrix/data.frame — quantile_normalize","text":"","code":"quantile_normalize(.data, .return_tibble = FALSE)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/quantile_normalize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Perform quantile normalization on a numeric matrix/data.frame — quantile_normalize","text":".data numeric matrix column represents sample. .return_tibble logical value determines output tibble. Default 'FALSE'.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/quantile_normalize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Perform quantile normalization on a numeric matrix/data.frame — quantile_normalize","text":"list object following: numeric matrix quantile normalized. row means quantile normalized matrix. sorted data ranked indices","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/quantile_normalize.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Perform quantile normalization on a numeric matrix/data.frame — quantile_normalize","text":"function performs quantile normalization numeric matrix following steps: Sort column input matrix. Calculate mean row across sorted columns. Replace column's sorted values row means. Unsort columns original order.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/quantile_normalize.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Perform quantile normalization on a numeric matrix/data.frame — quantile_normalize","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/quantile_normalize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Perform quantile normalization on a numeric matrix/data.frame — quantile_normalize","text":"","code":"# Create a sample numeric matrix data <- matrix(rnorm(20), ncol = 4) # Perform quantile normalization normalized_data <- quantile_normalize(data) #> Warning: There are duplicated ranks the input data. normalized_data #> $normalized_data #> [,1] [,2] [,3] [,4] #> [1,] -0.3544741 -1.1887651 0.1402623 0.1402623 #> [2,] -1.1887651 0.1402623 -0.3544741 -0.3544741 #> [3,] 0.1402623 -0.3544741 0.6082141 -1.1887651 #> [4,] 1.5541985 1.5541985 -1.1887651 0.6082141 #> [5,] 0.6082141 0.6082141 1.5541985 1.5541985 #> #> $row_means #> [1] -1.1887651 -0.3544741 0.1402623 0.6082141 1.5541985 #> #> $duplicated_ranks #> [,1] [,2] [,3] [,4] #> [1,] 5 2 1 2 #> [2,] 4 1 5 4 #> [3,] 2 3 3 1 #> [4,] 3 4 4 5 #> #> $duplicated_rank_row_indices #> [1] 1 3 4 5 #> #> $duplicated_rank_data #> [,1] [,2] [,3] [,4] #> [1,] -0.006202427 -0.1106733 -1.2344467 0.8044256 #> [2,] 2.531894845 0.1679075 0.7490085 -0.7630899 #> [3,] 0.212224663 0.6147875 1.2798579 -0.0333282 #> [4,] -2.150115206 -0.1142912 0.4928258 1.7902539 #> as.data.frame(normalized_data$normalized_data) |> sapply(function(x) quantile(x, probs = seq(0, 1, 1 / 4))) #> V1 V2 V3 V4 #> 0% -1.1887651 -1.1887651 -1.1887651 -1.1887651 #> 25% -0.3544741 -0.3544741 -0.3544741 -0.3544741 #> 50% 0.1402623 0.1402623 0.1402623 0.1402623 #> 75% 0.6082141 0.6082141 0.6082141 0.6082141 #> 100% 1.5541985 1.5541985 1.5541985 1.5541985 quantile_normalize( data.frame(sample1 = rnorm(30), sample2 = rnorm(30)), .return_tibble = TRUE) #> Warning: There are duplicated ranks the input data. #> $normalized_data #> # A tibble: 30 × 2 #> sample1 sample2 #> #> 1 -0.341 1.51 #> 2 -0.744 0.983 #> 3 0.109 0.645 #> 4 0.346 -0.150 #> 5 1.26 -0.316 #> 6 -0.551 -0.874 #> 7 0.346 -1.60 #> 8 0.719 -0.0315 #> 9 -1.81 -0.670 #> 10 -1.37 -0.403 #> # ℹ 20 more rows #> #> $row_means #> # A tibble: 30 × 1 #> value #> #> 1 -1.81 #> 2 -1.60 #> 3 -1.37 #> 4 -1.18 #> 5 -1.01 #> 6 -0.874 #> 7 -0.744 #> 8 -0.670 #> 9 -0.551 #> 10 -0.403 #> # ℹ 20 more rows #> #> $duplicated_ranks #> # A tibble: 2 × 1 #> value #> #> 1 8 #> 2 8 #> #> $duplicated_rank_row_indices #> # A tibble: 1 × 1 #> row_index #> #> 1 23 #> #> $duplicated_rank_data #> # A tibble: 2 × 1 #> value #> #> 1 0.727 #> 2 -0.566 #>"},{"path":"https://www.spsanderson.com/TidyDensity/reference/td_scale_color_colorblind.html","id":null,"dir":"Reference","previous_headings":"","what":"Provide Colorblind Compliant Colors — td_scale_color_colorblind","title":"Provide Colorblind Compliant Colors — td_scale_color_colorblind","text":"Provide Colorblind Compliant Colors","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/td_scale_color_colorblind.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Provide Colorblind Compliant Colors — td_scale_color_colorblind","text":"","code":"td_scale_color_colorblind(..., theme = \"td\")"},{"path":"https://www.spsanderson.com/TidyDensity/reference/td_scale_color_colorblind.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Provide Colorblind Compliant Colors — td_scale_color_colorblind","text":"... Data passed function theme defaults td allowed value","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/td_scale_fill_colorblind.html","id":null,"dir":"Reference","previous_headings":"","what":"Provide Colorblind Compliant Colors — td_scale_fill_colorblind","title":"Provide Colorblind Compliant Colors — td_scale_fill_colorblind","text":"Provide Colorblind Compliant Colors","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/td_scale_fill_colorblind.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Provide Colorblind Compliant Colors — td_scale_fill_colorblind","text":"","code":"td_scale_fill_colorblind(..., theme = \"td\")"},{"path":"https://www.spsanderson.com/TidyDensity/reference/td_scale_fill_colorblind.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Provide Colorblind Compliant Colors — td_scale_fill_colorblind","text":"... Data passed function theme defaults td allowed value","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidyeval.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy eval helpers — tidyeval","title":"Tidy eval helpers — tidyeval","text":"page lists tidy eval tools reexported package rlang. learn using tidy eval scripts packages high level, see dplyr programming vignette ggplot2 packages vignette. Metaprogramming section Advanced R may also useful deeper dive. tidy eval operators {{, !!, !!! syntactic constructs specially interpreted tidy eval functions. mostly need {{, !! !!! advanced operators use simple cases. curly-curly operator {{ allows tunnel data-variables passed function arguments inside tidy eval functions. {{ designed individual arguments. pass multiple arguments contained dots, use ... normal way. enquo() enquos() delay execution one several function arguments. former returns single expression, latter returns list expressions. defused, expressions longer evaluate . must injected back evaluation context !! (single expression) !!! (list expressions). simple case, code equivalent usage {{ ... . Defusing enquo() enquos() needed complex cases, instance need inspect modify expressions way. .data pronoun object represents current slice data. variable name string, use .data pronoun subset variable [[. Another tidy eval operator :=. makes possible use glue curly-curly syntax LHS =. technical reasons, R language support complex expressions left =, use := workaround. Many tidy eval functions like dplyr::mutate() dplyr::summarise() give automatic name unnamed inputs. need create sort automatic names , use as_label(). instance, glue-tunnelling syntax can reproduced manually : Expressions defused enquo() (tunnelled {{) need simple column names, can arbitrarily complex. as_label() handles cases gracefully. code assumes simple column name, use as_name() instead. safer throws error input name expected.","code":"my_function <- function(data, var, ...) { data %>% group_by(...) %>% summarise(mean = mean({{ var }})) } my_function <- function(data, var, ...) { # Defuse var <- enquo(var) dots <- enquos(...) # Inject data %>% group_by(!!!dots) %>% summarise(mean = mean(!!var)) } my_var <- \"disp\" mtcars %>% summarise(mean = mean(.data[[my_var]])) my_function <- function(data, var, suffix = \"foo\") { # Use `{{` to tunnel function arguments and the usual glue # operator `{` to interpolate plain strings. data %>% summarise(\"{{ var }}_mean_{suffix}\" := mean({{ var }})) } my_function <- function(data, var, suffix = \"foo\") { var <- enquo(var) prefix <- as_label(var) data %>% summarise(\"{prefix}_mean_{suffix}\" := mean(!!var)) }"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_autoplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Automatic Plot of Density Data — tidy_autoplot","title":"Automatic Plot of Density Data — tidy_autoplot","text":"auto plotting function take tidy_ distribution function arguments, one plot type, quoted string one following: density quantile probablity qq mcmc number simulations exceeds 9 legend print. plot subtitle put together attributes table passed function.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_autoplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Automatic Plot of Density Data — tidy_autoplot","text":"","code":"tidy_autoplot( .data, .plot_type = \"density\", .line_size = 0.5, .geom_point = FALSE, .point_size = 1, .geom_rug = FALSE, .geom_smooth = FALSE, .geom_jitter = FALSE, .interactive = FALSE )"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_autoplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Automatic Plot of Density Data — tidy_autoplot","text":".data data passed tidy_distribution function like tidy_normal() .plot_type quoted string like 'density' .line_size size param ggplot .geom_point Boolean value TREU/FALSE, FALSE default. TRUE return plot ggplot2::ggeom_point() .point_size point size param ggplot .geom_rug Boolean value TRUE/FALSE, FALSE default. TRUE return use ggplot2::geom_rug() .geom_smooth Boolean value TRUE/FALSE, FALSE default. TRUE return use ggplot2::geom_smooth() aes parameter group set FALSE. ensures single smoothing band returned SE also set FALSE. Color set 'black' linetype 'dashed'. .geom_jitter Boolean value TRUE/FALSE, FALSE default. TRUE return use ggplot2::geom_jitter() .interactive Boolean value TRUE/FALSE, FALSE default. TRUE return interactive plotly plot.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_autoplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Automatic Plot of Density Data — tidy_autoplot","text":"ggplot plotly plot.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_autoplot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Automatic Plot of Density Data — tidy_autoplot","text":"function spit one following plots: density quantile probability qq mcmc","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_autoplot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Automatic Plot of Density Data — tidy_autoplot","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_autoplot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Automatic Plot of Density Data — tidy_autoplot","text":"","code":"tidy_normal(.num_sims = 5) |> tidy_autoplot() tidy_normal(.num_sims = 20) |> tidy_autoplot(.plot_type = \"qq\")"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_bernoulli.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy Randomly Generated Bernoulli Distribution Tibble — tidy_bernoulli","title":"Tidy Randomly Generated Bernoulli Distribution Tibble — tidy_bernoulli","text":"function generate n random points Bernoulli distribution user provided, .prob, number random simulations produced. function returns tibble simulation number column x column corresponds n randomly generated points, d_, p_ q_ data points well. data returned un-grouped. columns output : sim_number current simulation number. x current value n current simulation. y randomly generated data point. dx x value stats::density() function. dy y value stats::density() function. p values resulting p_ function distribution family. q values resulting q_ function distribution family.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_bernoulli.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy Randomly Generated Bernoulli Distribution Tibble — tidy_bernoulli","text":"","code":"tidy_bernoulli(.n = 50, .prob = 0.1, .num_sims = 1, .return_tibble = TRUE)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_bernoulli.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy Randomly Generated Bernoulli Distribution Tibble — tidy_bernoulli","text":".n number randomly generated points want. .prob probability success/failure. .num_sims number randomly generated simulations want. .return_tibble logical value indicating whether return result tibble. Default TRUE.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_bernoulli.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy Randomly Generated Bernoulli Distribution Tibble — tidy_bernoulli","text":"tibble randomly generated data.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_bernoulli.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy Randomly Generated Bernoulli Distribution Tibble — tidy_bernoulli","text":"function uses rbinom(), underlying p, d, q functions. Bernoulli distribution special case Binomial distribution size = 1 hence binom functions used set size = 1.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_bernoulli.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tidy Randomly Generated Bernoulli Distribution Tibble — tidy_bernoulli","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_bernoulli.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy Randomly Generated Bernoulli Distribution Tibble — tidy_bernoulli","text":"","code":"tidy_bernoulli() #> # A tibble: 50 × 7 #> sim_number x y dx dy p q #> #> 1 1 1 0 -0.405 0.0292 0.9 0 #> 2 1 2 0 -0.368 0.0637 0.9 0 #> 3 1 3 0 -0.331 0.129 0.9 0 #> 4 1 4 1 -0.294 0.243 1 1 #> 5 1 5 0 -0.258 0.424 0.9 0 #> 6 1 6 0 -0.221 0.688 0.9 0 #> 7 1 7 0 -0.184 1.03 0.9 0 #> 8 1 8 1 -0.147 1.44 1 1 #> 9 1 9 0 -0.110 1.87 0.9 0 #> 10 1 10 0 -0.0727 2.25 0.9 0 #> # ℹ 40 more rows"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_beta.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy Randomly Generated Beta Distribution Tibble — tidy_beta","title":"Tidy Randomly Generated Beta Distribution Tibble — tidy_beta","text":"function generate n random points beta distribution user provided, .shape1, .shape2, .ncp non-centrality parameter, number random simulations produced. function returns tibble simulation number column x column corresponds n randomly generated points, d_, p_ q_ data points well. data returned un-grouped. columns output : sim_number current simulation number. x current value n current simulation. y randomly generated data point. dx x value stats::density() function. dy y value stats::density() function. p values resulting p_ function distribution family. q values resulting q_ function distribution family.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_beta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy Randomly Generated Beta Distribution Tibble — tidy_beta","text":"","code":"tidy_beta( .n = 50, .shape1 = 1, .shape2 = 1, .ncp = 0, .num_sims = 1, .return_tibble = TRUE )"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_beta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy Randomly Generated Beta Distribution Tibble — tidy_beta","text":".n number randomly generated points want. .shape1 non-negative parameter Beta distribution. .shape2 non-negative parameter Beta distribution. .ncp non-centrality parameter Beta distribution. .num_sims number randomly generated simulations want. .return_tibble logical value indicating whether return result tibble. Default TRUE.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_beta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy Randomly Generated Beta Distribution Tibble — tidy_beta","text":"tibble randomly generated data.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_beta.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy Randomly Generated Beta Distribution Tibble — tidy_beta","text":"function uses underlying stats::rbeta(), underlying p, d, q functions. information please see stats::rbeta()","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_beta.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tidy Randomly Generated Beta Distribution Tibble — tidy_beta","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_beta.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy Randomly Generated Beta Distribution Tibble — tidy_beta","text":"","code":"tidy_beta() #> # A tibble: 50 × 7 #> sim_number x y dx dy p q #> #> 1 1 1 0.359 -0.353 0.00273 0.359 0.359 #> 2 1 2 0.988 -0.318 0.00644 0.988 0.988 #> 3 1 3 0.295 -0.283 0.0141 0.295 0.295 #> 4 1 4 0.724 -0.248 0.0284 0.724 0.724 #> 5 1 5 0.729 -0.213 0.0532 0.729 0.729 #> 6 1 6 0.301 -0.178 0.0925 0.301 0.301 #> 7 1 7 0.423 -0.143 0.149 0.423 0.423 #> 8 1 8 1.00 -0.107 0.224 1.00 1.00 #> 9 1 9 0.816 -0.0724 0.315 0.816 0.816 #> 10 1 10 0.784 -0.0373 0.416 0.784 0.784 #> # ℹ 40 more rows"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_binomial.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy Randomly Generated Binomial Distribution Tibble — tidy_binomial","title":"Tidy Randomly Generated Binomial Distribution Tibble — tidy_binomial","text":"function generate n random points binomial distribution user provided, .size, .prob, number random simulations produced. function returns tibble simulation number column x column corresponds n randomly generated points, d_, p_ q_ data points well. data returned un-grouped. columns output : sim_number current simulation number. x current value n current simulation. y randomly generated data point. dx x value stats::density() function. dy y value stats::density() function. p values resulting p_ function distribution family. q values resulting q_ function distribution family.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_binomial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy Randomly Generated Binomial Distribution Tibble — tidy_binomial","text":"","code":"tidy_binomial( .n = 50, .size = 0, .prob = 1, .num_sims = 1, .return_tibble = TRUE )"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_binomial.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy Randomly Generated Binomial Distribution Tibble — tidy_binomial","text":".n number randomly generated points want. .size Number trials, zero . .prob Probability success trial. .num_sims number randomly generated simulations want. .return_tibble logical value indicating whether return result tibble. Default TRUE.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_binomial.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy Randomly Generated Binomial Distribution Tibble — tidy_binomial","text":"tibble randomly generated data.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_binomial.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy Randomly Generated Binomial Distribution Tibble — tidy_binomial","text":"function uses underlying stats::rbinom(), underlying p, d, q functions. information please see stats::rbinom()","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_binomial.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tidy Randomly Generated Binomial Distribution Tibble — tidy_binomial","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_binomial.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy Randomly Generated Binomial Distribution Tibble — tidy_binomial","text":"","code":"tidy_binomial() #> # A tibble: 50 × 7 #> sim_number x y dx dy p q #> #> 1 1 1 0 -1.23 0.0109 1 0 #> 2 1 2 0 -1.18 0.0156 1 0 #> 3 1 3 0 -1.13 0.0220 1 0 #> 4 1 4 0 -1.08 0.0305 1 0 #> 5 1 5 0 -1.03 0.0418 1 0 #> 6 1 6 0 -0.983 0.0564 1 0 #> 7 1 7 0 -0.932 0.0749 1 0 #> 8 1 8 0 -0.882 0.0981 1 0 #> 9 1 9 0 -0.832 0.126 1 0 #> 10 1 10 0 -0.781 0.161 1 0 #> # ℹ 40 more rows"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_bootstrap.html","id":null,"dir":"Reference","previous_headings":"","what":"Bootstrap Empirical Data — tidy_bootstrap","title":"Bootstrap Empirical Data — tidy_bootstrap","text":"Takes input vector numeric data produces bootstrapped nested tibble simulation number.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_bootstrap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bootstrap Empirical Data — tidy_bootstrap","text":"","code":"tidy_bootstrap( .x, .num_sims = 2000, .proportion = 0.8, .distribution_type = \"continuous\" )"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_bootstrap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bootstrap Empirical Data — tidy_bootstrap","text":".x vector data passed function. Must numeric vector. .num_sims default 2000, can set anything desired. warning pass console value less 2000. .proportion much original data want pass sampling function. default 0.80 (80%) .distribution_type can either 'continuous' 'discrete'","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_bootstrap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bootstrap Empirical Data — tidy_bootstrap","text":"nested tibble","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_bootstrap.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Bootstrap Empirical Data — tidy_bootstrap","text":"function take numeric input vector produce tibble bootstrapped values list. table output two columns: sim_number bootstrap_samples sim_number corresponds many times want data resampled, bootstrap_samples column contains list boostrapped resampled data.","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_bootstrap.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Bootstrap Empirical Data — tidy_bootstrap","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_bootstrap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Bootstrap Empirical Data — tidy_bootstrap","text":"","code":"x <- mtcars$mpg tidy_bootstrap(x) #> # A tibble: 2,000 × 2 #> sim_number bootstrap_samples #> #> 1 1 #> 2 2 #> 3 3 #> 4 4 #> 5 5 #> 6 6 #> 7 7 #> 8 8 #> 9 9 #> 10 10 #> # ℹ 1,990 more rows"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_burr.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy Randomly Generated Burr Distribution Tibble — tidy_burr","title":"Tidy Randomly Generated Burr Distribution Tibble — tidy_burr","text":"function generate n random points Burr distribution user provided, .shape1, .shape2, .scale, .rate, number random simulations produced. function returns tibble simulation number column x column corresponds n randomly generated points, d_, p_ q_ data points well. data returned un-grouped. columns output : sim_number current simulation number. x current value n current simulation. y randomly generated data point. dx x value stats::density() function. dy y value stats::density() function. p values resulting p_ function distribution family. q values resulting q_ function distribution family.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_burr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy Randomly Generated Burr Distribution Tibble — tidy_burr","text":"","code":"tidy_burr( .n = 50, .shape1 = 1, .shape2 = 1, .rate = 1, .scale = 1/.rate, .num_sims = 1, .return_tibble = TRUE )"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_burr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy Randomly Generated Burr Distribution Tibble — tidy_burr","text":".n number randomly generated points want. .shape1 Must strictly positive. .shape2 Must strictly positive. .rate alternative way specify .scale. .scale Must strictly positive. .num_sims number randomly generated simulations want. .return_tibble logical value indicating whether return result tibble. Default TRUE.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_burr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy Randomly Generated Burr Distribution Tibble — tidy_burr","text":"tibble randomly generated data.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_burr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy Randomly Generated Burr Distribution Tibble — tidy_burr","text":"function uses underlying actuar::rburr(), underlying p, d, q functions. information please see actuar::rburr()","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_burr.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tidy Randomly Generated Burr Distribution Tibble — tidy_burr","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_burr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy Randomly Generated Burr Distribution Tibble — tidy_burr","text":"","code":"tidy_burr() #> # A tibble: 50 × 7 #> sim_number x y dx dy p q #> #> 1 1 1 0.371 -2.84 0.000966 0.271 0.371 #> 2 1 2 5.25 -1.03 0.0666 0.840 5.25 #> 3 1 3 7.27 0.790 0.237 0.879 7.27 #> 4 1 4 1.72 2.61 0.104 0.633 1.72 #> 5 1 5 0.857 4.42 0.0287 0.461 0.857 #> 6 1 6 0.294 6.24 0.0255 0.227 0.294 #> 7 1 7 12.5 8.05 0.0260 0.926 12.5 #> 8 1 8 9.76 9.87 0.0171 0.907 9.76 #> 9 1 9 0.874 11.7 0.0122 0.466 0.874 #> 10 1 10 1.76 13.5 0.0105 0.638 1.76 #> # ℹ 40 more rows"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_cauchy.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy Randomly Generated Cauchy Distribution Tibble — tidy_cauchy","title":"Tidy Randomly Generated Cauchy Distribution Tibble — tidy_cauchy","text":"function generate n random points cauchy distribution user provided, .location, .scale, number random simulations produced. function returns tibble simulation number column x column corresponds n randomly generated points, d_, p_ q_ data points well. data returned un-grouped. columns output : sim_number current simulation number. x current value n current simulation. y randomly generated data point. dx x value stats::density() function. dy y value stats::density() function. p values resulting p_ function distribution family. q values resulting q_ function distribution family.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_cauchy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy Randomly Generated Cauchy Distribution Tibble — tidy_cauchy","text":"","code":"tidy_cauchy( .n = 50, .location = 0, .scale = 1, .num_sims = 1, .return_tibble = TRUE )"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_cauchy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy Randomly Generated Cauchy Distribution Tibble — tidy_cauchy","text":".n number randomly generated points want. .location location parameter. .scale scale parameter, must greater equal 0. .num_sims number randomly generated simulations want. .return_tibble logical value indicating whether return result tibble. Default TRUE.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_cauchy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy Randomly Generated Cauchy Distribution Tibble — tidy_cauchy","text":"tibble randomly generated data.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_cauchy.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy Randomly Generated Cauchy Distribution Tibble — tidy_cauchy","text":"function uses underlying stats::rcauchy(), underlying p, d, q functions. information please see stats::rcauchy()","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_cauchy.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tidy Randomly Generated Cauchy Distribution Tibble — tidy_cauchy","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_cauchy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy Randomly Generated Cauchy Distribution Tibble — tidy_cauchy","text":"","code":"tidy_cauchy() #> # A tibble: 50 × 7 #> sim_number x y dx dy p q #> #> 1 1 1 -1.14 -107. 2.50e- 4 0.229 -1.14 #> 2 1 2 -2.15 -103. 2.91e- 5 0.138 -2.15 #> 3 1 3 -3.73 -98.9 0 0.0833 -3.73 #> 4 1 4 2.25 -94.9 6.56e-20 0.867 2.25 #> 5 1 5 0.0564 -91.0 1.51e-18 0.518 0.0564 #> 6 1 6 0.686 -87.1 4.19e-18 0.691 0.686 #> 7 1 7 -0.325 -83.2 0 0.400 -0.325 #> 8 1 8 -0.456 -79.3 6.52e-19 0.364 -0.456 #> 9 1 9 3.66 -75.4 0 0.915 3.66 #> 10 1 10 0.0966 -71.5 1.48e-18 0.531 0.0966 #> # ℹ 40 more rows"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_chisquare.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy Randomly Generated Chisquare (Non-Central) Distribution Tibble — tidy_chisquare","title":"Tidy Randomly Generated Chisquare (Non-Central) Distribution Tibble — tidy_chisquare","text":"function generate n random points chisquare distribution user provided, .df, .ncp, number random simulations produced. function returns tibble simulation number column x column corresponds n randomly generated points, d_, p_ q_ data points well. data returned un-grouped. columns output : sim_number current simulation number. x current value n current simulation. y randomly generated data point. dx x value stats::density() function. dy y value stats::density() function. p values resulting p_ function distribution family. q values resulting q_ function distribution family.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_chisquare.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy Randomly Generated Chisquare (Non-Central) Distribution Tibble — tidy_chisquare","text":"","code":"tidy_chisquare( .n = 50, .df = 1, .ncp = 1, .num_sims = 1, .return_tibble = TRUE )"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_chisquare.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy Randomly Generated Chisquare (Non-Central) Distribution Tibble — tidy_chisquare","text":".n number randomly generated points want. .df Degrees freedom (non-negative can non-integer) .ncp Non-centrality parameter, must non-negative. .num_sims number randomly generated simulations want. .return_tibble logical value indicating whether return result tibble. Default TRUE.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_chisquare.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy Randomly Generated Chisquare (Non-Central) Distribution Tibble — tidy_chisquare","text":"tibble randomly generated data.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_chisquare.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy Randomly Generated Chisquare (Non-Central) Distribution Tibble — tidy_chisquare","text":"function uses underlying stats::rchisq(), underlying p, d, q functions. information please see stats::rchisq()","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_chisquare.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tidy Randomly Generated Chisquare (Non-Central) Distribution Tibble — tidy_chisquare","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_chisquare.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy Randomly Generated Chisquare (Non-Central) Distribution Tibble — tidy_chisquare","text":"","code":"tidy_chisquare() #> # A tibble: 50 × 7 #> sim_number x y dx dy p q #> #> 1 1 1 0.0110 -2.58 0.00141 0.0507 0.0110 #> 2 1 2 5.28 -2.22 0.00471 0.902 5.28 #> 3 1 3 1.39 -1.86 0.0133 0.556 1.39 #> 4 1 4 0.00843 -1.51 0.0321 0.0444 0.00843 #> 5 1 5 0.0290 -1.15 0.0659 0.0825 0.0290 #> 6 1 6 2.90 -0.793 0.116 0.756 2.90 #> 7 1 7 0.369 -0.436 0.174 0.293 0.369 #> 8 1 8 6.24 -0.0799 0.227 0.933 6.24 #> 9 1 9 3.64 0.277 0.257 0.816 3.64 #> 10 1 10 3.95 0.633 0.258 0.837 3.95 #> # ℹ 40 more rows"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_combined_autoplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Automatic Plot of Combined Multi Dist Data — tidy_combined_autoplot","title":"Automatic Plot of Combined Multi Dist Data — tidy_combined_autoplot","text":"auto plotting function take tidy_ distribution function arguments, one plot type, quoted string one following: density quantile probablity qq mcmc number simulations exceeds 9 legend print. plot subtitle put together attributes table passed function.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_combined_autoplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Automatic Plot of Combined Multi Dist Data — tidy_combined_autoplot","text":"","code":"tidy_combined_autoplot( .data, .plot_type = \"density\", .line_size = 0.5, .geom_point = FALSE, .point_size = 1, .geom_rug = FALSE, .geom_smooth = FALSE, .geom_jitter = FALSE, .interactive = FALSE )"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_combined_autoplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Automatic Plot of Combined Multi Dist Data — tidy_combined_autoplot","text":".data data passed function tidy_multi_dist() .plot_type quoted string like 'density' .line_size size param ggplot .geom_point Boolean value TREU/FALSE, FALSE default. TRUE return plot ggplot2::ggeom_point() .point_size point size param ggplot .geom_rug Boolean value TRUE/FALSE, FALSE default. TRUE return use ggplot2::geom_rug() .geom_smooth Boolean value TRUE/FALSE, FALSE default. TRUE return use ggplot2::geom_smooth() aes parameter group set FALSE. ensures single smoothing band returned SE also set FALSE. Color set 'black' linetype 'dashed'. .geom_jitter Boolean value TRUE/FALSE, FALSE default. TRUE return use ggplot2::geom_jitter() .interactive Boolean value TRUE/FALSE, FALSE default. TRUE return interactive plotly plot.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_combined_autoplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Automatic Plot of Combined Multi Dist Data — tidy_combined_autoplot","text":"ggplot plotly plot.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_combined_autoplot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Automatic Plot of Combined Multi Dist Data — tidy_combined_autoplot","text":"function spit one following plots: density quantile probability qq mcmc","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_combined_autoplot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Automatic Plot of Combined Multi Dist Data — tidy_combined_autoplot","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_combined_autoplot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Automatic Plot of Combined Multi Dist Data — tidy_combined_autoplot","text":"","code":"combined_tbl <- tidy_combine_distributions( tidy_normal(), tidy_gamma(), tidy_beta() ) combined_tbl #> # A tibble: 150 × 8 #> sim_number x y dx dy p q dist_type #> #> 1 1 1 -1.36 -3.52 0.000368 0.0864 -1.36 Gaussian c(0, 1) #> 2 1 2 -1.20 -3.37 0.00102 0.116 -1.20 Gaussian c(0, 1) #> 3 1 3 0.804 -3.22 0.00254 0.789 0.804 Gaussian c(0, 1) #> 4 1 4 0.969 -3.06 0.00565 0.834 0.969 Gaussian c(0, 1) #> 5 1 5 -1.09 -2.91 0.0113 0.138 -1.09 Gaussian c(0, 1) #> 6 1 6 -1.38 -2.76 0.0203 0.0835 -1.38 Gaussian c(0, 1) #> 7 1 7 -0.672 -2.61 0.0331 0.251 -0.672 Gaussian c(0, 1) #> 8 1 8 0.371 -2.46 0.0498 0.645 0.371 Gaussian c(0, 1) #> 9 1 9 1.44 -2.30 0.0699 0.925 1.44 Gaussian c(0, 1) #> 10 1 10 -0.0394 -2.15 0.0931 0.484 -0.0394 Gaussian c(0, 1) #> # ℹ 140 more rows combined_tbl |> tidy_combined_autoplot() combined_tbl |> tidy_combined_autoplot(.plot_type = \"qq\")"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_combine_distributions.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine Multiple Tidy Distributions of Different Types — tidy_combine_distributions","title":"Combine Multiple Tidy Distributions of Different Types — tidy_combine_distributions","text":"allows user specify n number tidy_ distributions can combined single tibble. preferred method combining multiple distributions different types, example Gaussian distribution Beta distribution. generates single tibble added column dist_type give distribution family name associated parameters.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_combine_distributions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine Multiple Tidy Distributions of Different Types — tidy_combine_distributions","text":"","code":"tidy_combine_distributions(...)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_combine_distributions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine Multiple Tidy Distributions of Different Types — tidy_combine_distributions","text":"... ... can place different distributions","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_combine_distributions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine Multiple Tidy Distributions of Different Types — tidy_combine_distributions","text":"tibble","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_combine_distributions.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Combine Multiple Tidy Distributions of Different Types — tidy_combine_distributions","text":"Allows user generate tibble different tidy_ distributions","code":""},{"path":[]},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_combine_distributions.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Combine Multiple Tidy Distributions of Different Types — tidy_combine_distributions","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_combine_distributions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Combine Multiple Tidy Distributions of Different Types — tidy_combine_distributions","text":"","code":"tn <- tidy_normal() tb <- tidy_beta() tc <- tidy_cauchy() tidy_combine_distributions(tn, tb, tc) #> # A tibble: 150 × 8 #> sim_number x y dx dy p q dist_type #> #> 1 1 1 -0.199 -3.47 0.000222 0.421 -0.199 Gaussian c(0, 1) #> 2 1 2 0.142 -3.32 0.000638 0.556 0.142 Gaussian c(0, 1) #> 3 1 3 2.28 -3.16 0.00161 0.989 2.28 Gaussian c(0, 1) #> 4 1 4 1.63 -3.01 0.00355 0.949 1.63 Gaussian c(0, 1) #> 5 1 5 0.547 -2.86 0.00694 0.708 0.547 Gaussian c(0, 1) #> 6 1 6 0.215 -2.71 0.0121 0.585 0.215 Gaussian c(0, 1) #> 7 1 7 -1.42 -2.55 0.0193 0.0771 -1.42 Gaussian c(0, 1) #> 8 1 8 -0.850 -2.40 0.0288 0.198 -0.850 Gaussian c(0, 1) #> 9 1 9 0.886 -2.25 0.0411 0.812 0.886 Gaussian c(0, 1) #> 10 1 10 -1.44 -2.10 0.0576 0.0748 -1.44 Gaussian c(0, 1) #> # ℹ 140 more rows ## OR tidy_combine_distributions( tidy_normal(), tidy_beta(), tidy_cauchy(), tidy_logistic() ) #> # A tibble: 200 × 8 #> sim_number x y dx dy p q dist_type #> #> 1 1 1 -0.258 -3.24 0.000490 0.398 -0.258 Gaussian c(0, 1) #> 2 1 2 0.719 -3.12 0.00130 0.764 0.719 Gaussian c(0, 1) #> 3 1 3 0.720 -2.99 0.00309 0.764 0.720 Gaussian c(0, 1) #> 4 1 4 -0.697 -2.87 0.00648 0.243 -0.697 Gaussian c(0, 1) #> 5 1 5 -0.402 -2.75 0.0121 0.344 -0.402 Gaussian c(0, 1) #> 6 1 6 0.457 -2.63 0.0200 0.676 0.457 Gaussian c(0, 1) #> 7 1 7 -0.456 -2.50 0.0296 0.324 -0.456 Gaussian c(0, 1) #> 8 1 8 1.24 -2.38 0.0392 0.893 1.24 Gaussian c(0, 1) #> 9 1 9 0.183 -2.26 0.0473 0.573 0.183 Gaussian c(0, 1) #> 10 1 10 0.176 -2.14 0.0532 0.570 0.176 Gaussian c(0, 1) #> # ℹ 190 more rows"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_distribution_comparison.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare Empirical Data to Distributions — tidy_distribution_comparison","title":"Compare Empirical Data to Distributions — tidy_distribution_comparison","text":"Compare empirical data set different distributions help find distribution best fit.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_distribution_comparison.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare Empirical Data to Distributions — tidy_distribution_comparison","text":"","code":"tidy_distribution_comparison( .x, .distribution_type = \"continuous\", .round_to_place = 3 )"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_distribution_comparison.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare Empirical Data to Distributions — tidy_distribution_comparison","text":".x data set passed function .distribution_type kind data , can one continuous discrete .round_to_place many decimal places parameter estimates rounded distibution construction. default 3","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_distribution_comparison.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compare Empirical Data to Distributions — tidy_distribution_comparison","text":"invisible list object. tibble printed.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_distribution_comparison.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compare Empirical Data to Distributions — tidy_distribution_comparison","text":"purpose function take data set provided try find distribution may fit best. parameter .distribution_type must set either continuous discrete order function try appropriate types distributions. following distributions used: Continuous: tidy_beta tidy_cauchy tidy_chisquare tidy_exponential tidy_gamma tidy_logistic tidy_lognormal tidy_normal tidy_pareto tidy_uniform tidy_weibull Discrete: tidy_binomial tidy_geometric tidy_hypergeometric tidy_poisson function returns list output tibbles. tibbles returned: comparison_tbl deviance_tbl total_deviance_tbl aic_tbl kolmogorov_smirnov_tbl multi_metric_tbl comparison_tbl long tibble lists values density function given data. deviance_tbl total_deviance_tbl just give simple difference actual density estimated density given estimated distribution. aic_tbl provide AIC liklehood distribution. kolmogorov_smirnov_tbl now provides two.sided estimate ks.test estimated density empirical. multi_metric_tbl summarise metrics single tibble.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_distribution_comparison.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compare Empirical Data to Distributions — tidy_distribution_comparison","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_distribution_comparison.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compare Empirical Data to Distributions — tidy_distribution_comparison","text":"","code":"xc <- mtcars$mpg output_c <- tidy_distribution_comparison(xc, \"continuous\") #> For the beta distribution, its mean 'mu' should be 0 < mu < 1. The data will #> therefore be scaled to enforce this. #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> There was no need to scale the data. #> Warning: There were 97 warnings in `dplyr::mutate()`. #> The first warning was: #> ℹ In argument: `aic_value = dplyr::case_when(...)`. #> Caused by warning in `actuar::dpareto()`: #> ! NaNs produced #> ℹ Run dplyr::last_dplyr_warnings() to see the 96 remaining warnings. xd <- trunc(xc) output_d <- tidy_distribution_comparison(xd, \"discrete\") #> There was no need to scale the data. #> Warning: There were 12 warnings in `dplyr::mutate()`. #> The first warning was: #> ℹ In argument: `aic_value = dplyr::case_when(...)`. #> Caused by warning in `actuar::dpareto()`: #> ! NaNs produced #> ℹ Run dplyr::last_dplyr_warnings() to see the 11 remaining warnings. output_c #> $comparison_tbl #> # A tibble: 384 × 8 #> sim_number x y dx dy p q dist_type #> #> 1 1 1 21 2.97 0.000114 0.625 10.4 Empirical #> 2 1 2 21 4.21 0.000455 0.625 10.4 Empirical #> 3 1 3 22.8 5.44 0.00142 0.781 13.3 Empirical #> 4 1 4 21.4 6.68 0.00355 0.688 14.3 Empirical #> 5 1 5 18.7 7.92 0.00721 0.469 14.7 Empirical #> 6 1 6 18.1 9.16 0.0124 0.438 15 Empirical #> 7 1 7 14.3 10.4 0.0192 0.125 15.2 Empirical #> 8 1 8 24.4 11.6 0.0281 0.812 15.2 Empirical #> 9 1 9 22.8 12.9 0.0395 0.781 15.5 Empirical #> 10 1 10 19.2 14.1 0.0516 0.531 15.8 Empirical #> # ℹ 374 more rows #> #> $deviance_tbl #> # A tibble: 384 × 2 #> name value #> #> 1 Empirical 0.451 #> 2 Beta c(1.107, 1.577, 0) 0.287 #> 3 Cauchy c(19.2, 7.375) -0.0169 #> 4 Chisquare c(20.243, 0) -0.106 #> 5 Exponential c(0.05) 0.230 #> 6 Gamma c(11.47, 1.752) -0.0322 #> 7 Logistic c(20.091, 3.27) 0.193 #> 8 Lognormal c(2.958, 0.293) 0.283 #> 9 Pareto c(10.4, 1.624) 0.446 #> 10 Uniform c(8.341, 31.841) 0.242 #> # ℹ 374 more rows #> #> $total_deviance_tbl #> # A tibble: 11 × 2 #> dist_with_params abs_tot_deviance #> #> 1 Gamma c(11.47, 1.752) 0.0235 #> 2 Chisquare c(20.243, 0) 0.462 #> 3 Beta c(1.107, 1.577, 0) 0.640 #> 4 Uniform c(8.341, 31.841) 1.11 #> 5 Weibull c(3.579, 22.288) 1.34 #> 6 Cauchy c(19.2, 7.375) 1.56 #> 7 Logistic c(20.091, 3.27) 2.74 #> 8 Lognormal c(2.958, 0.293) 4.72 #> 9 Gaussian c(20.091, 5.932) 4.74 #> 10 Pareto c(10.4, 1.624) 6.95 #> 11 Exponential c(0.05) 7.67 #> #> $aic_tbl #> # A tibble: 11 × 3 #> dist_type aic_value abs_aic #> #> 1 Beta c(1.107, 1.577, 0) NA NA #> 2 Cauchy c(19.2, 7.375) 218. 218. #> 3 Chisquare c(20.243, 0) NA NA #> 4 Exponential c(0.05) 258. 258. #> 5 Gamma c(11.47, 1.752) 206. 206. #> 6 Logistic c(20.091, 3.27) 209. 209. #> 7 Lognormal c(2.958, 0.293) 206. 206. #> 8 Pareto c(10.4, 1.624) 260. 260. #> 9 Uniform c(8.341, 31.841) 206. 206. #> 10 Weibull c(3.579, 22.288) 209. 209. #> 11 Gaussian c(20.091, 5.932) 209. 209. #> #> $kolmogorov_smirnov_tbl #> # A tibble: 11 × 6 #> dist_type ks_statistic ks_pvalue ks_method alternative dist_char #> #> 1 Beta c(1.107, 1.577, … 0.75 0.000500 Monte-Ca… two-sided Beta c(1… #> 2 Cauchy c(19.2, 7.375) 0.469 0.00200 Monte-Ca… two-sided Cauchy c… #> 3 Chisquare c(20.243, 0) 0.219 0.446 Monte-Ca… two-sided Chisquar… #> 4 Exponential c(0.05) 0.469 0.00100 Monte-Ca… two-sided Exponent… #> 5 Gamma c(11.47, 1.752) 0.156 0.847 Monte-Ca… two-sided Gamma c(… #> 6 Logistic c(20.091, 3.… 0.125 0.976 Monte-Ca… two-sided Logistic… #> 7 Lognormal c(2.958, 0.… 0.281 0.160 Monte-Ca… two-sided Lognorma… #> 8 Pareto c(10.4, 1.624) 0.719 0.000500 Monte-Ca… two-sided Pareto c… #> 9 Uniform c(8.341, 31.8… 0.188 0.621 Monte-Ca… two-sided Uniform … #> 10 Weibull c(3.579, 22.2… 0.219 0.443 Monte-Ca… two-sided Weibull … #> 11 Gaussian c(20.091, 5.… 0.156 0.833 Monte-Ca… two-sided Gaussian… #> #> $multi_metric_tbl #> # A tibble: 11 × 8 #> dist_type abs_tot_deviance aic_value abs_aic ks_statistic ks_pvalue ks_method #> #> 1 Gamma c(… 0.0235 206. 206. 0.156 0.847 Monte-Ca… #> 2 Chisquar… 0.462 NA NA 0.219 0.446 Monte-Ca… #> 3 Beta c(1… 0.640 NA NA 0.75 0.000500 Monte-Ca… #> 4 Uniform … 1.11 206. 206. 0.188 0.621 Monte-Ca… #> 5 Weibull … 1.34 209. 209. 0.219 0.443 Monte-Ca… #> 6 Cauchy c… 1.56 218. 218. 0.469 0.00200 Monte-Ca… #> 7 Logistic… 2.74 209. 209. 0.125 0.976 Monte-Ca… #> 8 Lognorma… 4.72 206. 206. 0.281 0.160 Monte-Ca… #> 9 Gaussian… 4.74 209. 209. 0.156 0.833 Monte-Ca… #> 10 Pareto c… 6.95 260. 260. 0.719 0.000500 Monte-Ca… #> 11 Exponent… 7.67 258. 258. 0.469 0.00100 Monte-Ca… #> # ℹ 1 more variable: alternative #> #> attr(,\".x\") #> [1] 21.0 21.0 22.8 21.4 18.7 18.1 14.3 24.4 22.8 19.2 17.8 16.4 17.3 15.2 10.4 #> [16] 10.4 14.7 32.4 30.4 33.9 21.5 15.5 15.2 13.3 19.2 27.3 26.0 30.4 15.8 19.7 #> [31] 15.0 21.4 #> attr(,\".n\") #> [1] 32 output_d #> $comparison_tbl #> # A tibble: 160 × 8 #> sim_number x y dx dy p q dist_type #> #> 1 1 1 21 2.95 0.000120 0.719 10 Empirical #> 2 1 2 21 4.14 0.000487 0.719 10 Empirical #> 3 1 3 22 5.34 0.00154 0.781 13 Empirical #> 4 1 4 21 6.54 0.00383 0.719 14 Empirical #> 5 1 5 18 7.74 0.00766 0.469 14 Empirical #> 6 1 6 18 8.93 0.0129 0.469 15 Empirical #> 7 1 7 14 10.1 0.0194 0.156 15 Empirical #> 8 1 8 24 11.3 0.0282 0.812 15 Empirical #> 9 1 9 22 12.5 0.0397 0.781 15 Empirical #> 10 1 10 19 13.7 0.0524 0.562 15 Empirical #> # ℹ 150 more rows #> #> $deviance_tbl #> # A tibble: 160 × 2 #> name value #> #> 1 Empirical 0.478 #> 2 Binomial c(32, 0.031) 0.145 #> 3 Geometric c(0.048) -0.000463 #> 4 Hypergeometric c(21, 11, 21) -0.322 #> 5 Poisson c(19.688) -0.0932 #> 6 Empirical 0.478 #> 7 Binomial c(32, 0.031) 0.478 #> 8 Geometric c(0.048) 0.361 #> 9 Hypergeometric c(21, 11, 21) -0.122 #> 10 Poisson c(19.688) 0.193 #> # ℹ 150 more rows #> #> $total_deviance_tbl #> # A tibble: 4 × 2 #> dist_with_params abs_tot_deviance #> #> 1 Hypergeometric c(21, 11, 21) 2.52 #> 2 Binomial c(32, 0.031) 2.81 #> 3 Poisson c(19.688) 3.19 #> 4 Geometric c(0.048) 6.07 #> #> $aic_tbl #> # A tibble: 4 × 3 #> dist_type aic_value abs_aic #> #> 1 Binomial c(32, 0.031) Inf Inf #> 2 Geometric c(0.048) 258. 258. #> 3 Hypergeometric c(21, 11, 21) NaN NaN #> 4 Poisson c(19.688) 210. 210. #> #> $kolmogorov_smirnov_tbl #> # A tibble: 4 × 6 #> dist_type ks_statistic ks_pvalue ks_method alternative dist_char #> #> 1 Binomial c(32, 0.031) 0.719 0.000500 Monte-Ca… two-sided Binomial… #> 2 Geometric c(0.048) 0.5 0.00200 Monte-Ca… two-sided Geometri… #> 3 Hypergeometric c(21, 1… 0.625 0.000500 Monte-Ca… two-sided Hypergeo… #> 4 Poisson c(19.688) 0.156 0.850 Monte-Ca… two-sided Poisson … #> #> $multi_metric_tbl #> # A tibble: 4 × 8 #> dist_type abs_tot_deviance aic_value abs_aic ks_statistic ks_pvalue ks_method #> #> 1 Hypergeom… 2.52 NaN NaN 0.625 0.000500 Monte-Ca… #> 2 Binomial … 2.81 Inf Inf 0.719 0.000500 Monte-Ca… #> 3 Poisson c… 3.19 210. 210. 0.156 0.850 Monte-Ca… #> 4 Geometric… 6.07 258. 258. 0.5 0.00200 Monte-Ca… #> # ℹ 1 more variable: alternative #> #> attr(,\".x\") #> [1] 21 21 22 21 18 18 14 24 22 19 17 16 17 15 10 10 14 32 30 33 21 15 15 13 19 #> [26] 27 26 30 15 19 15 21 #> attr(,\".n\") #> [1] 32"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_distribution_summary_tbl.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy Distribution Summary Statistics Tibble — tidy_distribution_summary_tbl","title":"Tidy Distribution Summary Statistics Tibble — tidy_distribution_summary_tbl","text":"function returns summary statistics tibble. use y column tidy_ distribution function.","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_distribution_summary_tbl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy Distribution Summary Statistics Tibble — tidy_distribution_summary_tbl","text":"","code":"tidy_distribution_summary_tbl(.data, ...)"},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_distribution_summary_tbl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy Distribution Summary Statistics Tibble — tidy_distribution_summary_tbl","text":".data data going passed tidy_ distribution function. ... grouping variable gets passed dplyr::group_by() dplyr::select().","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_distribution_summary_tbl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy Distribution Summary Statistics Tibble — tidy_distribution_summary_tbl","text":"summary stats tibble","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_distribution_summary_tbl.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy Distribution Summary Statistics Tibble — tidy_distribution_summary_tbl","text":"function takes tidy_ distribution table return tibble following information: sim_number mean_val median_val std_val min_val max_val skewness kurtosis range iqr variance ci_hi ci_lo kurtosis skewness come package healthyR.ai","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_distribution_summary_tbl.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tidy Distribution Summary Statistics Tibble — tidy_distribution_summary_tbl","text":"Steven P. Sanderson II, MPH","code":""},{"path":"https://www.spsanderson.com/TidyDensity/reference/tidy_distribution_summary_tbl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy Distribution Summary Statistics Tibble — tidy_distribution_summary_tbl","text":"","code":"library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union tn <- tidy_normal(.num_sims = 5) tb <- tidy_beta(.num_sims = 5) tidy_distribution_summary_tbl(tn) #> # A tibble: 1 × 12 #> mean_val median_val std_val min_val max_val skewness kurtosis range iqr #> #> 1 0.0462 0.0747 0.966 -2.82 2.80 0.0744 3.12 5.61 1.29 #> # ℹ 3 more variables: variance , ci_low , ci_high tidy_distribution_summary_tbl(tn, sim_number) #> # A tibble: 5 × 13 #> sim_number mean_val median_val std_val min_val max_val skewness kurtosis range #> #> 1 1 0.200 0.120 0.928 -2.29 2.38 0.142 3.21 4.67 #> 2 2 -0.0698 -0.0932 0.868 -2.82 1.53 -0.422 3.55 4.35 #> 3 3 -0.0250 0.0539 0.869 -2.25 1.97 -0.141 2.92 4.22 #> 4 4 -0.0324 -0.120 1.17 -2.13 2.80 0.542 2.93 4.93 #> 5 5 0.158 0.299 0.969 -1.93 2.29 -0.264 2.58 4.22 #> # ℹ 4 more variables: iqr , variance , ci_low , ci_high data_tbl <- tidy_combine_distributions(tn, tb) tidy_distribution_summary_tbl(data_tbl) #> # A tibble: 1 × 12 #> mean_val median_val std_val min_val max_val skewness kurtosis range iqr #>