The iclogcondist package provides an efficient algorithm to compute the nonparametric maximum likelihood estimator (NPMLE) of a log-concave distribution function for the underlying event time in mixed-case interval-censored data. The computational algorithm combines an active set method with an iterative convex minorant algorithm.
Distribution Function Estimation: The package
provides a function ic_LCMLE
to estimate the distribution
function assuming its log-concavity, as well as functions to compute the
unconstrained MLE and the distribution function corresponding to the
least concave majorant (LCM) of the logarithm of the unconstrained
MLE.
Simulation Capabilities: Users can simulate interval-censored datasets where the underlying event times follows some common parametric families with a log-concave distribution function.
Visualization: The package includes plotting functions to compare the estimated distribution functions obtained from the log-concave MLE, the unconstrained MLE, and the distribution function corresponding to the LCM of the logarithm of the unconstrained MLE.
You can clone the repository iclogcondist locally, by running this command in your terminal
git clone https://github.com/ChaoyuYuan/iclogcondist.git
If you have cloned the repository locally, follow these steps to build and install the package manually:
In R, navigate to the package directory and build the package:
setwd("path/to/iclogcondist") # Change to your package directory
::document() # Generate documentation
devtools::build() # Build the package devtools
After building, you will get the package object
iclogcondist_1.0.0.tar.gz
. You can install the package
locally:
install.packages("path/to/iclogcondist_1.0.0.tar.gz", repos = NULL, type = "source")
or
::install_local("path/to/iclogcondist_1.0.0.tar.gz") devtools
The second command will install the prerequisite packages, such as Rcpp and ggplots, automatically during the process, while the first command will not.
You can also install the package directly from the local directory without building manually:
::install("path/to/iclogcondist") devtools
Similarly, this command will install the prerequisite packages automatically.
Once the package is installed, load it with:
library(iclogcondist)
Here is a simple example of how to use the iclogcondist
package:
data(lgnm)
<- lgnm
X
# Run the LC MLE algorithm
<- ic_LCMLE(X)
result
# Print the estimated distribution function
print(result$est$F_hat)
For more details in usage examples, please refer to the iclogcondist_Example.pdf file.
This package is licensed under the GPL-3 License.
Contributions are welcome! If you would like to report issues or contribute to the development, please feel free to open an issue or submit a pull request.