calculate_gamma_function: Calculate Gamma function

View source: R/calculate_gamma_function.R

calculate_gamma_functionR Documentation

Calculate Gamma function

Description

It calculates the value of the integral defined in Definition 11 from references. It implements Theorem 8 from references and uses the formula (19) from references.

Usage

calculate_gamma_function(perm, lambda)

Arguments

perm

An object of a gips_perm class. It can also be of a gips class, but it will be interpreted as the underlying gips_perm.

lambda

A positive real number.

Value

Returns the value of the Gamma function of the colored cone (for the definition of the colored cone, see the Basic definitions section in vignette("Theory", package = "gips") or in its pkgdown page).

References

Piotr Graczyk, Hideyuki Ishi, Bartosz Kołodziejek, Hélène Massam. "Model selection in the space of Gaussian models invariant by symmetry." The Annals of Statistics, 50(3) 1747-1774 June 2022. arXiv link; \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/22-AOS2174")}

See Also

  • get_structure_constants() - The function useful inside the calculate_gamma_function().

  • log_posteriori_of_gips() - The function that uses the values of the gamma function.

  • vignette("Theory", package = "gips") or its pkgdown page - A place to learn more about the math behind the gips package.

Examples

id_perm <- gips_perm("()", 2)
calculate_gamma_function(id_perm, 0.5001) # 10.7...
calculate_gamma_function(id_perm, 0.50000001) # 19.9...
calculate_gamma_function(id_perm, 0.500000000001) # 29.1...

oldw <- getOption("warn")
options(warn = -1)
calculate_gamma_function(id_perm, 0.5) # Inf
# Integral diverges; returns Inf and warning
options(warn = oldw)


PrzeChoj/gips documentation built on June 12, 2025, 12:23 a.m.