Skip to main content

Information criteria for composite likelihood models

Project description

IClik is a minimal package for evaluating composite likelihood models using Composite Likelihood AIC and BIC (CLAIC/CLBIC).

For a review of these information criteria, please see: Ng, C. T., & Joe, H. (2014). Model comparison with composite likelihood information criteria. Bernoulli, 20(4), 1738–1764. http://www.jstor.org/stable/43590422

This package is in development. Please let me know about any bugs or problems by raising an issue on GitHub.

Available information criteria

Composite Likelihood AIC (CLAIC)

The composite likelihood version of the Akaike information criterion (AIC) was proposed by Varin et al (2011). It is calculated as:

\begin{equation*} CLAIC = -2L_{CL}(\hat\theta_{CL}) + 2tr[\mathbf{J}(\hat\theta_{CL})\mathbf{H}^{-1}(\hat\theta_{CL})] \end{equation*}

Where \(\mathbf{J(\theta)}\) and \(\mathbf{H(\theta)}\) are the Jacobian and Hessian matrices of the likelihood function, and \(\hat\theta_{CL}\) represents the composite maximum likelihood estimate.

Reference: Varin, C., Reid, N., & Firth, D. (2011). AN OVERVIEW OF COMPOSITE LIKELIHOOD METHODS. Statistica Sinica, 21(1), 5–42. http://www.jstor.org/stable/24309261

Composite Likelihood BIC (CLBIC)

CLBIC, formulated by Gao and Song (2010), is similar to CLAIC, but adjusts for sample size n:

\begin{equation*} CLBIC = -2L_{CL}(\hat\theta_{CL}) + log(n) tr[\mathbf{J}(\hat\theta_{CL})\mathbf{H}^{-1}(\hat\theta_{CL})] \end{equation*}

Reference: Gao, X., & Song, P. X.-K. (2010). Composite Likelihood Bayesian Information Criteria for Model Selection in High-Dimensional Data. Journal of the American Statistical Association, 105(492), 1531–1540. http://www.jstor.org/stable/27920184

Installation

IClik is available via PyPi: pip install iclik.

Syntax

IClik is very easy to use, provided that you have a correctly formulated likelihood function. A simple example of how to use it is provided here.

Import claic:

from iclik.inform_crit import claic

First we need to define a composite likelihood function.

def f(params):
    """I'm a composite likelihood function"""
    x, y, z = params
    return x**2 + y**2 + z**2

Running IClik is then a one-liner:

claic(f, (1,2,3))

Output:

-26.000000000000004

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iclik-0.1.6a0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iclik-0.1.6a0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file iclik-0.1.6a0.tar.gz.

File metadata

  • Download URL: iclik-0.1.6a0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for iclik-0.1.6a0.tar.gz
Algorithm Hash digest
SHA256 2d8c5c93ddce9710cd9c391452bbe5d65eec79930a119aec3ccedf0a6ac5e8c0
MD5 3d75a0764c807dc1d215aa7c6d1a2c82
BLAKE2b-256 ce982ba5572a9edea0e5e48cc80d728e9008a16b4bb50e15cd4d36d049349b76

See more details on using hashes here.

File details

Details for the file iclik-0.1.6a0-py3-none-any.whl.

File metadata

  • Download URL: iclik-0.1.6a0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for iclik-0.1.6a0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ecbe2f77c7b92dba5d71870812a3b1f3dd24668811776f8aa49d5de47bab4cf
MD5 2b6c938d8cc8a09668590db1a48c65f5
BLAKE2b-256 000ecd91c7f146518eed845826f3093b06f7fa95fd53849287204b2e85a3f54c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page