dgin {ginormal}R Documentation

Density for the generalized inverse normal distribution

Description

Density for the generalized inverse normal distribution

Usage

dgin(z, alpha, mu, tau, log = TRUE, quasi = FALSE)

Arguments

z

quantile.

alpha

degrees-of-freedom parameter.

mu

similar to location parameter, controls asymmetry of the distribution.

tau

similar to scale parameter, controls spread of the distribution.

log

logical; should the log of the density be returned? Defaults to TRUE.

quasi

logical; should the quasi-density value be returned? Defaults to FALSE.

Details

Currently, only scalars are supported for the quantile and parameter values. Density is supported on the entire real line, z and mu can take any value in (-\infty, \infty). Density is only defined for parameter values alpha > 1 or tau > 0, so it is set to 0 outside of these values. The quasi-density or kernel is the density without the normalization constant, use quasi = TRUE for this behavior.

Value

Numeric scalar with density.

Examples

# Computing (log) density
dgin(z = 1, alpha = 3, mu = 1, tau = 1, log = TRUE, quasi = FALSE)

# Generalized inverse normal density with alpha = 5, mu = 0, tau = 1
z_vals <- seq(-5, 5, length.out = 200)
fz_unc <- sapply(z_vals, function(z) dgin(z, 5, 0, 1, FALSE))
plot(z_vals, fz_unc, type = "l", xlab = 'Values', ylab = 'Density')

[Package ginormal version 0.0.2 Index]