Skip to content

Commit

Permalink
Sdev adapted (90% percent of values in min/max)
Browse files Browse the repository at this point in the history
previous sdev only covered 80%

after QA of Wolfgang #14
  • Loading branch information
mrustl committed Feb 13, 2019
1 parent 61e0381 commit 1ca551a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions R/random_distribution.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ distribution_repeater <- function(number_of_repeatings = 10,
#' @param log10_mean mean value (default: (log10_min + log10_max)/2), only used
#' if 'type' is "log10_norm"
#' @param log10_sdev standard deviation (default: (log10_max- log10_mean) /
#' qnorm(0.9)), only used if 'type' is "log10_norm"
#' qnorm(0.95)), only used if 'type' is "log10_norm"
#' @param mean mean value (default: mean of min & max value), only used if 'type'
#' is "norm"
#' @param sdev standard deviation (default: (max-mean) / qnorm(0.9)),
#' @param sdev standard deviation (default: (max-mean) / qnorm(0.95)),
#' only used if 'type' is "norm"
#' @param meanlog log mean value (default: mean of log min & max value), only
#' used if 'type' is "lognorm"
Expand Down Expand Up @@ -112,9 +112,9 @@ create_random_distribution <- function(type = "uniform",
log10(max),
log10_zero_threshold),
log10_mean = (log10_min + log10_max) / 2,
log10_sdev = (log10_max - log10_mean) / qnorm(0.9),
log10_sdev = (log10_max - log10_mean) / qnorm(0.95),
mean = (min + max) / 2,
sdev = (max - mean) / qnorm(0.9),
sdev = (max - mean) / qnorm(0.95),
meanlog = mean(log((min + max) / 2)),
sdlog = sd(log((c(min, max)))),
mode = (min + max) / 2,
Expand Down
8 changes: 4 additions & 4 deletions man/create_random_distribution.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1ca551a

Please sign in to comment.