generalized_ratios_distribution {intRinsic}R Documentation

The Generalized Ratio distribution

Description

Density function and random number generator for the Generalized Ratio distribution with NN orders equal to n1 and n2. See Denti et al., 2022 for more details.

Usage

rgera(nsim, n1 = 1, n2 = 2, d)

dgera(x, n1 = 1, n2 = 2, d, log = FALSE)

Arguments

nsim

integer, the number of observations to generate.

n1

order of the first NN considered. Default is 1.

n2

order of the second NN considered. Default is 2.

d

value of the intrinsic dimension.

x

vector of quantiles.

log

logical, if TRUE, it returns the log-density

Value

dgera gives the density. rgera returns a vector of random observations sampled from the generalized ratio distribution.

References

Denti F, Doimo D, Laio A, Mira A (2022). "The generalized ratios intrinsic dimension estimator." Scientific Reports, 12(20005). ISSN 20452322, doi:10.1038/s41598-022-20991-1.

Examples

draws   <- rgera(100,3,5,2)
density <- dgera(3,3,5,2)


[Package intRinsic version 1.0.2 Index]