Get distribution function

.get_distribution_function(distribution, function_prefix)

Arguments

distribution

list. probability distribution specified in list format e.g. list(name = "gamma", shape = 2, scale = 4). The distribution list must contain a 'name' element, this element must be a string and correspond to one of the types of distributions supported in the Distributions package. distribution must also contain parameters for the specified distribution, in the form 'parameter_name=parameter_value'.

function_prefix

character. 'd', 'q', 'p' or 'r'. see stats::Distributions

Value

Density, distribution function, quantile function or random generation function for distribution