getParams {DistributionFitR}R Documentation

Get parameters and their properties for a Distribution Family

Description

Given a distribution family, this function attempts to retrieve the distribution parameters and various characteristics, such as: valid parameter ranges, whether they accept non-integer values and the support of the distribution.

Usage

getParams(fam, package)

Arguments

fam

character or list. If fam is a list or a named vector, then it has the two entries “package” and “family”, e.g. list(package=“stats”, family=“beta”)

package

character. Optional argument if fam is given. In most cases the package can be determined by getParams itself.

Details

The family name is defined as the part of the function name that follows “d”, “p”, “q” and “r”. So in case of the continuous uniform the family name is “unif”.
The values returned by getParams are included in the DistributionFitR-package and updated with each package update. Users may use it to update the library of parameter characteristics themselves or find the function useful to use the parameter characteristics retrieved for other purposes.

Value

For getParams a list with components, each of them a named vector: The names are the arguments of the distribution family as specified in e.g. the “r<distributionFamilyName>”-function, the value is described below:

lower

named vector; values: numeric, lower bound of the respective parameter value

upper

named vector; values: numeric, upper bound of the respective parameter value. Length and names must coincide with entry lower.

accepts_float

named vector; values: boolean, TRUE if respective parameter value is continuous, FALSE if only integers are accepted. Length and names must coincide with entry lower.

defaults

named vector; values: numeric, default values for the respective parameter (needed for optimisation to work). Length and names must coincide with entry lower.

log

single boolean; TRUE if log(probability) is provided by d[family](), FALSE if they are not. Generating log-probabilities oneself may be numerically unstable.

discrete

single boolean; TRUE if only integers are taken as values, FALSE otherwise.

support_min

single numeric; left bound of support of the distributions density, i.e. minimum value where the density is not zero.

support_max

single numeric; right bound of support of the distributions density, i.e. maximum value where the density is not zero.

supp_max_depends_on

named vector; value: booleans, TRUE if right support bound depends on the repective parameter, FALSE if not. Note that dependency is currently implemented as equality between bound and parameter, linear relationships may be implemented in the future. Length and names must coincide with entry lower.

supp_max_depends_on

named vector; value: booleans, TRUE if right support bound depends on the repective parameter, FALSE if not. See note in entry supp_max_depends_on. Length and names must coincide with entry lower.

Author(s)

Benedikt Geier, Borui Niklas Zhu

See Also

See also getFamilies for a convenient wrapper available to the user where distributions are extracted from whole packages.

Examples

getParams("beta", package = "stats")
getParams("unif", package = "stats" )

[Package DistributionFitR version 0.1 Index]