getFamilies {DistributionFitR}R Documentation

Lists (all) distribution families with their parameters

Description

This function extracts distribution families from R-packages along with their parameters and characteristics, and scans specific packages if desired.

Usage

getFamilies(all.packages)

Arguments

all.packages

character vector or missing or logical; package names in which to scan:

character

the distribution families given

TRUE

all installed packages

FALSE

base packages of R

If missing, a list of recognized families is returned.

Details

This function retrieves distribution families from R-packages as specified in ‘arguments’. A distribution family is defined as follows:
Take the functions dnorm, pnorm, qnorm and rnorm from the package ‘stats’. These functions are related to sampling, density etc. of the normal distribution. The family name is the part of the function name without the prefixes ‘d’, ‘p’, ‘q’, or ‘r’ , in this case: ‘norm’.

Value

A list of lists. Each sublist pertains to exactly one distribution family (such as ‘norm’ from ‘stats’) and contains:

package

character; name of the package containing the family

family

character; name of the family, as defined under “Details”

family_info
  • lower: named numeric vector; lower bounds for distribution parameters

  • upper: named numeric vector; upper bounds for distribution parameters

  • accepts_float: named logical vector; whether each parameter can be any real number (TRUE) or only integers are valid inputs (FALSE)

  • defaults: names numeric vector; set of default parameters that jointly constitute valid input. Used for optimisation.

  • log: logical; whether log values are provided by the density function

  • discrete: logical; whether the distribution itself (not the parameters) takes on discrete values only

  • support_min: numeric; lower bound of the support, i.e. lowest value of x where f(x) > 0 numerically for any valid parameter set, f the density function

  • support_max: numeric; upper bound of the support

  • support_max_depends_on: named logical vector; whether support_max depends on the value of each parameter

  • support_min_depends_on: named logical vector; whether support_min depends on the value of each parameter

Author(s)

Tim Glockner, Adrian Heppeler, Borui Niklas Zhu

Examples

 
  str(getFamilies())

[Package DistributionFitR version 0.1 Index]