Package {neojags}


Type: Package
Title: Neo-Normal Distributions Family for Markov Chain Monte Carlo (MCMC) Models in 'JAGS'
Version: 0.1.8
Description: A 'JAGS' extension module provides neo-normal distributions family including MSNBurr, MSNBurr-IIa, GMSNBurr, Lunetta Exponential Power, Fernandez-Steel Skew t, Fernandez-Steel Skew Normal, Fernandez-Osiewalski-Steel Skew Exponential Power, Jones Skew Exponential Power. References: Choir, A. S. (2020). "The New Neo-Normal Distributions and Their Properties".Unpublished Dissertation. Denwood, M.J. (2016) <doi:10.18637/jss.v071.i09>. Fernandez, C., Osiewalski, J., & Steel, M. F. (1995) <doi:10.1080/01621459.1995.10476637>. Fernandez, C., & Steel, M. F. (1998) <doi:10.1080/01621459.1998.10474117>. Iriawan, N. (2000). "Computationally Intensive Approaches to Inference in NeoNormal Linear Models".Unpublished Dissertation. Mineo, A., & Ruggieri, M. (2005) <doi:10.18637/jss.v012.i04>. Rigby, R. A., & Stasinopoulos, D. M. (2005) <doi:10.1111/j.1467-9876.2005.00510.x>. Lunetta, G. (1963). "Di una Generalizzazione dello Schema della Curva Normale". Rigby, R. A., Stasinopoulos, M. D., Heller, G. Z., & Bastiani, F. D. (2019) <doi:10.1201/9780429298547>.
URL: https://github.com/madsyair/neojags
BugReports: https://github.com/madsyair/neojags/issues
License: GPL-2
Encoding: UTF-8
SystemRequirements: JAGS >= 4.3.0 (https://mcmc-jags.sourceforge.io/)
Depends: R (≥ 2.14.0)
Imports: runjags, utils, rjags (≥ 4-18)
Suggests: testthat (≥ 3.0.0), knitr, rmarkdown, markdown, spelling
Config/testthat/edition: 3
VignetteBuilder: knitr
Language: en-US
NeedsCompilation: yes
Maintainer: Achmad Syahrul Choir <madsyair@stis.ac.id>
Author: Achmad Syahrul Choir [aut, cre], Resi Ramadani [aut], Nur Iriawan [aut], S Sifa'ul Khusna Malikhatul Mutmainah [ctb], Matthew Denwood [cph], Martyn Plummer [cph] (Copyright holder of the code in src/distributions/D*.*, configure.ac, R/runjags_functions.R, and original copyright holder of some modified code where indicated)
Config/roxygen2/version: 8.1.1
Packaged: 2026-11-23 17:37:28 UTC; madsyair
Repository: CRAN
Date/Publication: 2026-11-24 09:00:10 UTC

Load the internal JAGS module provided by neojags

Description

The neojags package contains a JAGS extension module that provides several additional distributions for use within JAGS (see details below). This function is a simple wrapper to load this module. The version of the module supplied within the neojags package can only be used with the rjags package, or with the rjags or rjparallel methods within runjags. For a standalone JAGS module for use with any JAGS method (or independent JAGS runs) please see: https://sourceforge.net/projects/neojags/

Usage

load.neojagsmodule(fail = TRUE, silent = FALSE)

unload.neojagsmodule(silent = FALSE)

load.neoJAGSmodule(fail = TRUE, silent = FALSE)

unload.neoJAGSmodule(silent = FALSE)

Arguments

fail

deprecated option that is now ignored

silent

option to suppress messages

Details

This module provides the following distributions for JAGS:

Jones'S Skew Exponential Power: djskew.ep(mu, tau, nu1, nu2)

For y<\mu:

p(y) = c\sqrt{\tau }\exp \left[ -{{\left| \sqrt{\tau }(y-\mu ) \right|}^{{{\nu }_{1}}}} \right]

For y \ge \mu:

p(y) = c\sqrt{\tau }\exp \left[ -{{\left| \sqrt{\tau }(y-\mu ) \right|}^{{{\nu }_{2}}}} \right]

where

c = {{\left[ \Gamma \left( 1+{{\nu }_{1}}^{-1} \right)+\Gamma \left( 1+{{\nu }_{2}}^{-1} \right) \right]}^{-1}}

-\infty < \mu < \infty, \tau > 0, \nu_1 > 0, \nu_2 > 0

GMSNBurr: dgmsnburr(mu, tau,alpha1,alpha2)

p(y) = \frac{\tau \omega \left( {{\alpha }_{1}},{{\alpha }_{2}} \right)}{B\left( {{\alpha }_{1}},{{\alpha }_{2}} \right)}{{\left( \frac{{{\alpha }_{2}}}{{{\alpha }_{1}}} \right)}^{{{\alpha }_{2}}}}\frac{\exp \left( -{{\alpha }_{2}}\tau \omega \left( {{\alpha }_{1}},{{\alpha }_{2}} \right)\left( y-\mu \right) \right)}{{{\left( 1+\frac{{{\alpha }_{2}}}{{{\alpha }_{1}}}\exp \left( -\tau \omega \left( {{\alpha }_{1}},{{\alpha }_{2}} \right)\left( y-\mu \right) \right) \right)}^{({{\alpha }_{1}}+{{\alpha }_{2}})}}}

where

{\omega \left( {{\alpha }_{1}},{{\alpha }_{2}} \right)=\frac{B\left( {{\alpha }_{1}},{{\alpha }_{2}} \right)}{\sqrt{2\pi }}{{\left( 1+\frac{{{\alpha }_{2}}}{{{\alpha }_{1}}} \right)}^{\left( {{\alpha }_{1}}+{{\alpha }_{2}} \right)}}{{\left( \frac{{{\alpha }_{2}}}{{{\alpha }_{1}}} \right)}^{-{{\alpha }_{2}}}}}{\omega \left( {{\alpha }_{1}},{{\alpha }_{2}} \right)=\frac{B\left( {{\alpha }_{1}},{{\alpha }_{2}} \right)}{\sqrt{2\pi }}{{\left( 1+\frac{{{\alpha }_{2}}}{{{\alpha }_{1}}} \right)}^{\left( {{\alpha }_{1}}+{{\alpha }_{2}} \right)}}{{\left( \frac{{{\alpha }_{2}}}{{{\alpha }_{1}}} \right)}^{-{{\alpha }_{2}}}}}

-\infty < \mu < \infty, \tau > 0, \alpha_1 > 0, \alpha_2 > 0

MSNBurr: dmsnburr(mu, tau,alpha)

p(y) = \frac{\tau \omega (\alpha )\exp \left( -\tau \omega (\alpha )(y-\mu ) \right)}{{{\left( 1+\frac{\exp \left( -\tau \omega (\alpha )(y-\mu ) \right)}{\alpha } \right)}^{\left( \alpha +1 \right)}}}

where

{\omega \left( \alpha \right)=\frac{1}{\sqrt{2\pi }}{{\left( 1+\frac{1}{\alpha } \right)}^{\left( \alpha +1 \right)}}}{\omega \left( \alpha \right)=\frac{1}{\sqrt{2\pi }}{{\left( 1+\frac{1}{\alpha } \right)}^{\left( \alpha +1 \right)}}}

- \infty < \mu < \infty , \tau > 0, \alpha > 0

MSNBurr-IIa: dmsnburr2a(mu, tau, alpha)

p(y) = \frac{\tau \omega (\alpha )\exp \left( \tau \omega (\alpha )\left( y-\mu \right) \right)}{{{\left( 1+\frac{\exp \left( \tau \omega (\alpha )\left( y-\mu \right) \right)}{\alpha } \right)}^{\left( \alpha +1 \right)}}}

-\infty < \mu < \infty , \tau > 0, \alpha > 0

Fernandez-Osiewalski-Steel Skew Exponential Power: dfskew.ep(mu, tau, nu, alpha)

For y<\mu:

p(y) = c\sqrt{\tau }\exp \left[ -\frac{1}{2}{{\left| \alpha \sqrt{\tau }\left( y-\mu \right) \right|}^{\nu }} \right]

For y \ge \mu:

p(y) = c\sqrt{\tau }\exp \left[ -\frac{1}{2}{{\left| \frac{\sqrt{\tau }\left( y-\mu \right)}{\alpha } \right|}^{\nu }} \right]

where

c = \alpha \nu {{\left[ \left( 1+{{\alpha }^{2}} \right){{2}^{1/\tau }}\Gamma (1/\nu ) \right]}^{-1}}

-\infty < \mu < \infty , \tau > 0 , \nu > 0 , \alpha > 0

Fernandes Steel Skew-t: dfskew.t(mu, tau, nu, alpha)

For y<\mu:

p(y) = c\sqrt{\tau }{{\left( 1+\frac{{{\alpha }^{2}}\tau {{(y-\mu )}^{2}}}{\nu } \right)}^{-(\nu +1)/2}}

For y \ge \mu:

p(y) = c\sqrt{\tau }{{\left( 1+\frac{\tau {{(y-\mu )}^{2}}}{{{\alpha }^{2}}\nu } \right)}^{-(\nu +1)/2}}

where

c = 2\alpha {{\left[ \left( 1+{{\alpha }^{2}} \right)B(1/2,\nu /2){{\nu }^{1/2}} \right]}^{-1}}

-\infty < \mu < \infty , \tau > 0 , \nu > 0 , \alpha > 0

Fernandes Steel Skew Normal: dfskew.norm(mu, tau, alpha)

For y<\mu:

p(y) = \frac{2\alpha \sqrt{\tau }}{\sqrt{2\pi }(1+{{\alpha }^{2}})}{\exp}\left( -\frac{{{\alpha }^{2}}\tau }{2}{{(y-\mu )}^{2}} \right)

For y \ge \mu:

p(y) = \frac{2\alpha \sqrt{\tau }}{\sqrt{2\pi }(1+{{\alpha }^{2}})}{\exp}\left( -\frac{\tau }{2{{\alpha }^{2}}}{{(y-\mu )}^{2}} \right)

-\infty < \mu < \infty, \tau > 0, \alpha > 0

Lunetta Exponential Power : dlep(mu, tau, nu)

p(y) = \frac{\sqrt{\tau }}{2{{\nu }^{1/\nu }}\Gamma (1+1/\nu )}{{e}^{-\frac{1}{\nu }{{\left| \sqrt{\tau }(y-\mu ) \right|}^{\nu }}}}

-\infty < \mu < \infty, \tau > 0, \nu > 0

For an easier to read version of these PDF equations, see the userguide vignette.

References

Choir, A. S. 2020. The New Neo-Normal Distributions and Their Properties, Doctoral dissertation, Institut Teknologi Sepuluh November.

Denwood, M.J. 2016. runjags: An R Package Providing Interface Utilities, Model Templates, Parallel Computing Methods and Additional Distributions for MCMC Models in JAGS. J. Stat. Softw. 71. doi:10.18637/jss.v071.i09.

Fernandez, C., Osiewalski, J., & Steel, M. F. 1995. Modeling and inference with v-spherical distributions. Journal of the American Statistical Association, 90(432), 1331-1340.

Fernandez, C., & Steel, M. F. 1998. On Bayesian modeling of fat tails and skewness. Journal of the american statistical association, 93(441), 359-371.

Iriawan, N. 2000. Computationally Intensive Approaches to Inference in NeoNormal Linear Models, Doctoral dissertation, Curtin University of Technology, Perth, Australia.

Rigby, R. A., & Stasinopoulos, D. M. 2005. Generalized additive models for location, scale and shape. Journal of the Royal Statistical Society: Series C (Applied Statistics), 54(3), 507-554.

Lunetta, G. 1963. Di una Generalizzazione dello Schema della Curva Normale. Annali della Facolt'a di Economia e Commercio di Palermo, 17, 237–244.

Rigby, R. A., Stasinopoulos, M. D., Heller, G. Z., & Bastiani, F. D. 2019. Distributions for Modeling Location, Scale, and Shape: Using GAMLSS in R. CLC Press.

See Also

load.module

Examples

# Load the module for use with any rjags model:
neojags::load.neojagsmodule()
# A simple model to sample from a Jones's Skew Exponential Power Distribution distribution.
# (Requires the rjags or rjparallel methods)
m <- "model{
 L ~ djskew.ep(0,1,2,2)
		}"

library(runjags)
neojags::load.neojagsmodule()
results <- run.jags(m, monitor="L", method="rjags")

mirror server hosted at Truenetwork, Russian Federation.