Learn R Programming

Multivariate inverse Gaussian

This R package consists of utilities for multivariate inverse Gaussian (MIG) models with mean $\boldsymbol{\xi}$ and scale matrix $\boldsymbol{\Omega}$ defined over the halfspace ${\boldsymbol{x} \in \mathbb{R}^d: \boldsymbol{\beta}^\top\boldsymbol{x} > 0}$, including density evaluation and random number generation and kernel smoothing.

Distributions

  • mig for the MIG distribution(rmig for random number generation and dmig for density)
  • tellipt (rtellipt for random vector generation and dtellipt the density) for truncated Student-$t$ or Gaussian distribution over the half space ${\boldsymbol{x}: \boldsymbol{\beta}^\top\boldsymbol{x}>\delta}$ for $\delta \geq 0$.
  • fit_mig to estimate the parameters of the MIG distribution via maximum likelihood (mle) or the method of moments (mom).

Kernel density estimation

  • mig_kdens_bandwidth to estimate the bandwidth matrix minimizing the asymptotic mean integrated squared error (AMISE) or the leave-one-out likelihood cross validation, minimizing the Kullback--Leibler divergence. The amise estimators are estimated by drawing from a mig or truncated Gaussian vector via Monte Carlo
  • normalrule_bandwidth for the normal rule of Scott for the Gaussian kernel
  • mig_kdens for the kernel density estimator
  • tellipt_kdens for the truncated Gaussian kernel density estimator

Copy Link

Version

Install

install.packages('mig')

Monthly Downloads

155

Version

2.0

License

MIT + file LICENSE

Maintainer

Leo Belzile

Last Published

April 8th, 2025

Functions in mig (2.0)

mig_kdens

Multivariate inverse Gaussian kernel density estimator
dmig

Multivariate inverse Gaussian distribution
mig_loglik_hessian

Hessian of the MIG log likelihood with respect to data
geomagnetic

Magnetic storms
hsgauss_kdens

Gaussian kernel density estimator on half-space
mig_loglik_laplacian

Laplacian of the MIG log likelihood with respect to the data
mig_lcv

Likelihood cross-validation for MIG density estimation
mig_rlcv

Robust likelihood cross-validation for kernel density estimation for MIG
gauss_rlcv

Robust likelihood cross-validation for Gaussian kernel density estimation
gauss_lscv

Least squares cross-validation for Gaussian kernel density estimation
mig_loo

Leave-one-out cross-validation for kernel density estimation with MIG
mig_lscv

Least squares cross-validation for MIG density estimation
mle_truncgauss

Maximum likelihood estimation of truncated Gaussian on half space
tnorm_kdens

Truncated Gaussian kernel density estimator
proj_hs

Orthogonal projection matrix onto the half-space
normalrule_bandwidth

Normal bandwidth rule
tnorm_loo

Leave-one-out cross-validation for truncated Gaussian kernel density estimation
mig_loglik_grad

Gradient of the MIG log likelihood with respect to data
tnorm_lscv

Least squares cross-validation for truncated Gaussian kernel density estimation
rtellipt

Simulate elliptical vector subject to a linear constraint
tnorm_lcv

Likelihood cross-validation for truncated normal kernel density estimation
tnorm_kdens_arma

Truncated Gaussian kernel density estimator
tnorm_rlcv

Likelihood cross-validation for truncated normal kernel density estimation
dmig_laplacian

Laplacian of the MIG density with respect to the data
an

Threshold selection for bandwidth
fit_mig

Fit multivariate inverse Gaussian distribution
kdens_bandwidth

Optimal scale matrix for kernel density estimation
gauss_lcv

Likelihood cross-validation for Gaussian kernel density estimation
.lsum

Log of sum of terms
gauss_loo

Leave-one-out cross-validation for Gaussian kernel density estimation
gauss_kdens_arma

Gaussian kernel density estimator
.mig_mom

Method of moments estimators for multivariate inverse Gaussian vectors
dtellipt

Density of elliptical vectors subject to a linear constraint
mig_kdens_arma

MIG kernel density estimator
.mig_mle

Maximum likelihood estimation of multivariate inverse Gaussian vectors