get_dist_mode_from_pdf: get_dist_mode_from_pdf

Description Usage Arguments Details Value Examples

Description

Shortcut function to find the mode of an arbitrary probability density function (PDF). Uses optimization, i.e. may lead to imprecise results with exotic input functions. It is helpful when an analytic solution is not handily available.

Usage

1
2
get_dist_mode_from_pdf(pdf, search_range_start, search_range_end,
  tolerance = NULL, verbosity = NULL, ...)

Arguments

pdf

the input probability density function (PDF)

search_range_start

the minimal value of the range where the mode will be searched

search_range_end

the maximal value of the range where the mode will be searched

Details

Works only for continuous distribution functions.

Value

the estimated mode

Examples

1
get_dist_mode_from_pdf(function(x){return(dnorm(x = x, mean = 17, sd = 5))}, -100, 100)

daviddoret/GRCRToolkit documentation built on May 23, 2019, 7:31 a.m.