The lnmixsurv
package provides an easy interface to the Bayesian lognormal mixture model proposed by Lobo, Fonseca and Alves, 2023.
An usual formula-type model is implemented in survival_ln_mixture
, with the usual suvival::Surv()
interface. The model tries to follow the conventions for R modeling packages, and uses the hardhat structure.
The underlying algorithm implementation is a Gibbs sampler which takes initial values from a small run of the EM-Algorithm, with initial values selection based on the log-likelihood. Besides the Bayesian approach, the Expectation-Maximization approach (which focus on maximizing the likelihood) for censored data is also available. The methods are implemented in C++
using RcppArmadillo
for the linear algebra operations, RcppGSL
for the random number generation and seed control and RcppParallel
(since version 3.0.0) for parallelization.
The only dependency is on GSL, so, make sure you have GSL installed before proceeding Below, there are some basic guides on how to install these for each operational system other than Windows (Windows users are probably fine and ready to go).
Mac OSRun brew install gsl
at the console/terminal should be enough for installing GSL.
The installation of GSL on Linux is distro-specific. For the main distros out-there:
sudo pacman -S gsl
sudo yum install gsl-devel
or sudo dnf install gsl-devel
(make sure the EPEL â Extra Packages for Enterprise Linux â repository is enabled)sudo apt-get install libgsl-dev
sudo dnf install gsl-devel
sudo emerge sci-libs/gsl
sudo zypper install gsl-devel
You can install the latest development version of lnmixsurv
from GitHub:
# install.packages("devtools")
devtools::install_github("vivianalobo/lnmixsurv")
Alternatively, to install the latest development version of lnmixsurv
, you can use the following code:
# install.packages("devtools")
devtools::install_github("vivianalobo/lnmixsurv", "devel")
parsnip and censored extension
An extension to the models defined by parsnip and censored is also provided, adding the survival_ln_mixture
engine to the parsnip::survival_reg()
model.
The following models, engines, and prediction type are available/extended through persistencia
:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4