JointAI
Joint Analysis and Imputation of generalized linear models and linear mixed models with missing values
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (19.0%) to scientific vocabulary
Keywords
bayesian
generalized-linear-models
glm
glmm
imputation
imputations
jags
joint-analysis
linear-mixed-models
linear-regression-models
mcmc-sample
mcmc-sampling
missing-data
missing-values
rstats
survival
Last synced: 6 months ago
·
JSON representation
Repository
Joint Analysis and Imputation of generalized linear models and linear mixed models with missing values
Basic Info
- Host: GitHub
- Owner: NErler
- Language: R
- Default Branch: master
- Homepage: https://nerler.github.io/JointAI
- Size: 350 MB
Statistics
- Stars: 28
- Watchers: 3
- Forks: 4
- Open Issues: 6
- Releases: 0
Topics
bayesian
generalized-linear-models
glm
glmm
imputation
imputations
jags
joint-analysis
linear-mixed-models
linear-regression-models
mcmc-sample
mcmc-sampling
missing-data
missing-values
rstats
survival
Created over 9 years ago
· Last pushed 6 months ago
Metadata Files
Readme
Changelog
README.Rmd
---
output: github_document
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
fig.align = 'center'
)
```
# JointAI: Joint Analysis and Imputation of Incomplete Data
[](https://CRAN.R-project.org/package=JointAI)
[](https://CRAN.R-project.org/package=JointAI)
[](https://cran.r-project.org/package=JointAI)
[](https://app.codecov.io/gh/NErler/JointAI)
[](https://github.com/NErler/JointAI/actions)
The package **JointAI** provides functionality to perform joint analysis and
imputation of a range of model types in the Bayesian framework. Implemented are
(generalized) linear regression models and extensions thereof, models for
(un-/ordered) categorical data, as well as multi-level (mixed) versions of these
model types.
Moreover, survival models and joint models for longitudinal and survival data
are available. It is also possible to fit multiple models of mixed types
simultaneously. Missing values in (if present) will be imputed automatically.
**JointAI** performs some preprocessing of the data and creates a
[JAGS](https://mcmc-jags.sourceforge.io/) model, which will then automatically be
passed to [JAGS](https://mcmc-jags.sourceforge.io/) with the help of the R
package [**rjags**](https://CRAN.R-project.org/package=rjags).
Besides the main modelling functions, **JointAI** also provides a number of
functions to summarize and visualize results and incomplete data.
## Installation
**JointAI** can be installed from [CRAN](https://cran.r-project.org/):
```{r CRAN-instalation, eval = FALSE}
install.packages('JointAI')
```
Alternatively, you can install **JointAI** from GitHub:
```{r gh-installation, eval = FALSE}
# install.packages("remotes")
remotes::install_github("NErler/JointAI")
```
## Main functions
**JointAI** provides the following main functions:
``` r
lm_imp() # linear regression
glm_imp() # generalized linear regression
clm_imp() # cumulative logit model
mlogit_imp() # multinomial logit model
lognorm_imp() # log-normal regression
betareg_imp() # beta regression
lme_imp() / lmer_imp() # linear mixed model
glme_imp() / glmer_imp() # generalized linear mixed model
clmm_imp() # cumulative logit mixed model
mlogitmm_imp() # multinomial logit model
lognormmm_imp() # log-normal regression
betamm_imp() # beta regression
survreg_imp() # parametric (Weibull) survival model
coxph_imp() # proportional hazards survival model
JM_imp() # joint model for longitudinal and survival data
```
The functions use specification similar to that of well known standard functions
like `lm()` and `glm()` from base R, `nlme::lme()` (from the package
[**nlme**](https://CRAN.R-project.org/package=nlme)) , `lme4::lmer()` or
`lme4::glmer()` (from the package
[**lme4**](https://CRAN.R-project.org/package=lme4)) and `survival::survreg()`
and `survival::coxph()` (from the package
[**survival**](https://CRAN.R-project.org/package=survival)).
Functions `summary()`, `coef()`, `traceplot()` and `densplot()` provide a
summary of the posterior distribution and its visualization.
`GR_crit()` and `MC_error()` implement the Gelman-Rubin diagnostic for
convergence and the Monte Carlo error of the MCMC sample, respectively.
**JointAI** also provides functions for exploration of the distribution of the
data and missing values, export of imputed values and prediction.
## Minimal Example
### Visualize the observed data and missing data pattern
```{r, echo = FALSE}
par(mar = c(2.5, 3, 2.5, 1), mgp = c(2, 0.8, 0))
```
```{r, fig.width = 8, fig.height = 4, message = FALSE, collapse=TRUE}
library(JointAI)
plot_all(NHANES[c(1, 5:6, 8:12)], fill = '#D10E3B', border = '#460E1B', ncol = 4, breaks = 30)
```
```{r, fig.height = 5}
md_pattern(NHANES, color = c('#460E1B', '#D10E3B'))
```
### Fit a linear regression model with incomplete covariates
```{r fit_lm1, message = F}
lm1 <- lm_imp(SBP ~ gender + age + WC + alc + educ + bili,
data = NHANES, n.iter = 500, progress.bar = 'none', seed = 2020)
```
### Visualize the MCMC sample
```{r fig.width = 8, fig.height = 4, out.width = '100%', dpi = 300}
traceplot(lm1, col = c('#d4af37', '#460E1B', '#D10E3B'), ncol = 4)
```
```{r fig.width = 8, fig.height = 4, out.width = '100%', dpi = 300}
densplot(lm1, col = c('#d4af37', '#460E1B', '#D10E3B'), ncol = 4, lwd = 2)
```
### Summarize the Result
```{r}
summary(lm1)
```
```{r}
coef(lm1)
confint(lm1)
```
Owner
- Name: Nicole Erler
- Login: NErler
- Kind: user
- Location: Rotterdam
- Company: Erasmus MC
- Website: https://nerler.com
- Twitter: N_Erler
- Repositories: 3
- Profile: https://github.com/NErler
GitHub Events
Total
- Create event: 1
- Commit comment event: 1
- Issues event: 1
- Delete event: 2
- Push event: 5
- Pull request review event: 2
- Pull request event: 1
Last Year
- Create event: 1
- Commit comment event: 1
- Issues event: 1
- Delete event: 2
- Push event: 5
- Pull request review event: 2
- Pull request event: 1
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Nicole Erler | n****r@e****l | 2,094 |
| N.S. Erler | 2****5@e****l | 95 |
| Nicole Erler | N****r | 12 |
| NErler | e****e@g****m | 9 |
| GitHub Actions | a****s@g****m | 2 |
Committer Domains (Top 20 + Academic)
erasmusmc.nl: 2
github.com: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 15
- Total pull requests: 2
- Average time to close issues: 3 months
- Average time to close pull requests: N/A
- Total issue authors: 11
- Total pull request authors: 2
- Average comments per issue: 1.2
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- amirabadiza921 (3)
- KentSLDES (2)
- bbb801 (2)
- axinaxia (1)
- jenniejester (1)
- SiljeHS (1)
- jlhanson5 (1)
- YushuShi (1)
- Erfanit64 (1)
- harryparr (1)
- johnsonra (1)
- mikoSL (1)
Pull Request Authors
- johnsonra (1)
- NErler (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 591 last-month
- Total docker downloads: 42,767
- Total dependent packages: 2
- Total dependent repositories: 3
- Total versions: 16
- Total maintainers: 1
cran.r-project.org: JointAI
Joint Analysis and Imputation of Incomplete Data
- Homepage: https://nerler.github.io/JointAI/
- Documentation: http://cran.r-project.org/web/packages/JointAI/JointAI.pdf
- License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
-
Latest release: 1.0.6
published almost 2 years ago
Rankings
Docker downloads count: 0.6%
Stargazers count: 10.2%
Forks count: 12.2%
Average: 12.2%
Dependent packages count: 13.6%
Dependent repos count: 16.4%
Downloads: 20.3%
Maintainers (1)
Last synced:
6 months ago
Dependencies
DESCRIPTION
cran
- MASS * imports
- coda * imports
- future * imports
- mathjaxr * imports
- mcmcse * imports
- rjags * imports
- rlang * imports
- survival * imports
- bookdown * suggests
- covr * suggests
- foreign * suggests
- ggplot2 * suggests
- ggpubr * suggests
- knitr * suggests
- rmarkdown * suggests
- testthat * suggests