Package: pexm 1.1.3

Vinicius Mayrink
pexm: Loading a JAGS Module for the Piecewise Exponential Distribution
Load the Just Another Gibbs Sampling (JAGS) module 'pexm'. The module provides the tools to work with the Piecewise Exponential (PE) distribution in a Bayesian model with the corresponding Markov Chain Monte Carlo algorithm (Gibbs Sampling) implemented via JAGS. Details about the module implementation can be found in Mayrink et al. (2021) <doi:10.18637/jss.v100.i08>.
Authors:
pexm_1.1.3.tar.gz
pexm_1.1.3.tar.gz(r-4.5-noble)pexm_1.1.3.tar.gz(r-4.4-noble)
pexm.pdf |pexm.html✨
pexm/json (API)
NEWS
# Install 'pexm' in R: |
install.packages('pexm', repos = 'https://cloud.r-project.org') |
Bug tracker:https://github.com/vdinizm/pexm/issues0 issues
Last updated 1 years agofrom:dfe79facab. Checks:3 OK. Indexed: no.
Target | Result | Latest binary |
---|---|---|
Doc / Vignettes | OK | Mar 26 2025 |
R-4.5-linux-x86_64 | OK | Mar 26 2025 |
R-4.4-linux-x86_64 | OK | Mar 26 2025 |
Exports:loadpexm
Dependencies:clicodaexpmfansigenericsgluelatticelifecyclemagrittrMatrixmsmmvtnormpillarpkgconfigrjagsrlangsurvivaltibbleutf8vctrs
Citation
To cite pexm in publications use:
Mayrink VD, Duarte JDN, Demarqui FN (2021). “pexm: A JAGS Module for Applications Involving the Piecewise Exponential Distribution.” Journal of Statistical Software, 100(8), 1–28. doi:10.18637/jss.v100.i08.
Corresponding BibTeX entry:
@Article{, title = {{pexm}: A {JAGS} Module for Applications Involving the Piecewise Exponential Distribution}, author = {Vin\'{i}cius D. Mayrink and Jo\~{a}o Daniel N. Duarte and F\'{a}bio N. Demarqui}, journal = {Journal of Statistical Software}, year = {2021}, volume = {100}, number = {8}, pages = {1--28}, doi = {10.18637/jss.v100.i08}, }
Readme and manuals
pexm
R
package to load the JAGS
module pexm.
Description: The Piecewise Exponencial (PE) distribution is not available in JAGS
, therefore, many applications in survival analysis assuming a semiparametric modeling based on a piecewise constant hazard must consider a zeros-trick strategy to deal with the MCMC algorithm related to the Bayesian framework. The present R
package provides a JAGS
module containing distribution and related functions for the random variable T ~ PE(lambda, tau), where lambda is the vector of failure rates specified for different intervals in the time scale and tau is the vector defining a grid partitioning the time line related to the application. All details about the PE distribution and the proposed pexm
module can be found in Mayrink et al. (2021).
Authors: Vinícius D. Mayrink, João D. N. Duarte and Fábio N. Demarqui.
Departamento de Estatística, ICEx, Universidade Federal de Minas Gerais, Av. Antônio Carlos, 6627, Belo Horizonte, MG, Brazil, 31270-901.
Repositories: the source code of pexm
is open for free access in
In order to build this package, some scripts from the R
packages runjags
and rjags
were considered as examples. The source code of pexm
may also be used as a template to build other R
packages introducing new JAGS modules. Some knowledge of R
and C++
programming languanges are necessary to work through the details.
The package can be installed ("Unix or Windows") from CRAN applying the command install.packages("pexm")
in the R
console. In addition, the installation from GitHub can be done via devtools::install_github("vdinizm/pexm")
. Note that the R
package devtools
is required for this task.
Alternatively, the Sourceforge repository contains the package sources pexm_1.0.1.tar.gz
for both Unix or Windows. The user must download and install it via install.packages(path_to_file, repos = NULL, type="source")
, where path_to_file
should be replaced by the path pointing to the target tar.gz
.
Instructions: Before installing the package
pexm
, as indicated above, the user must first install a recent version of JAGS
in the computer. For those using the Windows system, the current recommended version is JAGS-4.3.0
. If using a different version, the variable JAGS_ROOT
, defined in the file Makevars.win
(within the directory src
of the source code), must be adapted with the correct numerical indication of version. In an Unix system, this modification is supposed to be automatic. The present package has the following dependencies on other R
packages:
rjags
providing tools to load a JAGS
module and to compile and run a Bayesian model implemented in JAGS
.msm
providing tools to work with the PE distribution in R
(important to run some comparison examples).Assuming that pexm
was succesfully installed in R
, the user is expected to load the package in the console via libary("pexm")
and then load the module using loadpexm()
. The message "module pexm loaded"
will be displayed when the module is ready to use. Since one might choose a non-standard location to save the pexm
package library, an error indication may appear in the console when the function loadpexm()
is not able to locate the key files pexm.so
(Unix) or pexm.dll
(Windows). In this situation, the user can manually set the path to the target directory containing one of these key files by using loadpexm("file_path")
, where file_path
should be replaced by a quoted path found by the user.
Help Manual
Help page | Topics |
---|---|
loadpexm | loadpexm |
pexm: Loading a Just Another Gibbs Sampling Module for the Piecewise Exponential Distribution | pexm-package pexm |