dot-is_valid_distribution.Rd
Check if valid distribution list
.is_valid_distribution( distribution, parameter_name = deparse(substitute(distribution)) )
distribution | list. probability distribution specified in list format
e.g. list(name = "gamma", shape = 2, scale = 4).
The |
---|---|
parameter_name | A string containing the name the tested parameter had in the initial function in which it was passed. |
boolean. Returns FALSE if parameter values return an improper distribution (if gamma distr). Throws an error if not a list, or not a list with the appropriate elements. Returns TRUE otherwise.