-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
135 lines (109 loc) · 4.82 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
---
output: github_document
link-citation: yes
pkgdown:
as_is:true
references:
- id: tang2017
title: "Controlled pattern imputation for sensitivity analysis of longitudinal binary and ordinal outcomes with nonignorable dropout"
author:
- family: Tang
given: Y
container-title: Statistics in Medicine
volume: 37
URL: 'https://dx.doi.org/10.1002/sim.7583'
DOI: 10.1002/sim.7583
issue: 9
page: 1467 -- 81
type: article-journal
issued:
year: 2018
- id: Erler2021
title: "JointAI: Joint Analysis and Imputation of Incomplete Data in R"
author:
- family: Erler
given: NS
- family: Rizopoulos
given: D
- family: Lesaffre
given: EMEH
container-title: Journal of Statistical Software
volume: 100
URL: 'https://dx.doi.org/10.18637/jss.v100.i20'
DOI: 10.18637/jss.v100.i20
issue: 20
page: 1 -- 56
type: article-journal
issued:
year: 2021
- id: wang2022
title: "Remiod: Reference-based Controlled Multiple Imputation of Longitudinal Binary and Ordinal Outcomes with non-ignorable missingness"
author:
- family: Wang
given: T
- family: Liu
given: Y
container-title: arXiv
volume: 2203.02771
URL: 'https://arxiv.org/pdf/2203.02771'
type: article-journal
issued:
year: 2022
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
fig.align = 'center'
)
```
# <span style="color: blue;">remiod</span>: Reference-based Controlled Multiple Imputation of Longitudinal Binary and Ordinal Outcomes with non-ignorable missingness
<!-- badges: start -->
[![CRAN Status](https://www.r-pkg.org/badges/version/remiod)](https://CRAN.R-project.org/package=remiod)
[![CRAN Downloads](https://cranlogs.r-pkg.org/badges/remiod)](https://cran.r-project.org/package=remiod)
[![GPL-3.0](https://img.shields.io/github/license/xsswang/remiod?logo=GNU&logoColor=FFFFFF&style=flat-square)](https://github.com/xsswang/remiod/main/LICENSE)
[![R build
status](https://github.com/xsswang/remiod/workflows/R-CMD-check/badge.svg)](https://github.com/xsswang/remiod/actions)
<!-- badges: end -->
The package **remiod** provides functionality to perform controlled multiple
imputation of binary and ordinal response in the Bayesian framework. Implemented are
(generalized) linear regression models for binary data and cumulative logistic models for
ordered categorical data [@wang2022]. It is also possible to fit multiple models of mixed types
simultaneously. Missing values in (if present) will be imputed automatically.
**remiod** has two algorithmic backend. One is [JAGS](https://mcmc-jags.sourceforge.io/), with which the function performs some preprocessing of the data and creates a JAGS 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). The another is based on the method proposed by Tang [@tang2017].
Besides the main modelling functions, **remiod** also provides functions to summarize and visualize results.
## Installation
**remiod** Can be from [CRAN](https://cran.r-project.org/web/packages/remiod/index.html):
```{r cran-install, eval = FALSE}
install.packages("remiod")
```
Or, it can be installed from GitHub:
```{r gh-installation, eval = FALSE}
# install.packages("remotes")
remotes::install_github("xsswang/remiod")
```
## Main functions
**remiod** provides the following main functions:
``` r
remiod #processing data and implementing MCMC sampling
extract_MIdata #extract imputed data sets
miAnalyze #Perform analyses using imputed data and pool results
```
Currently, methods **remiod** implements include missing at random (`MAR`), jump-to-reference (`J2R`), copy reference (`CR`), and delta adjustment (`delta`). For `method = "delta"`, argument `delta` should follow to specify a numerical values used in delta adjustment. These methods can be requested through `extract_MIdata()`, and imputed datasets can be analyzed using `miAnalyze()`.
Functions `summary()`, `coef()`, and `mcmcplot()` provide a summary of the posterior distribution under MAR and its visualization.
## Minimal Example
```{r, eval = FALSE}
data(schizow)
test = remiod(formula = y6 ~ tx + y0 + y1 + y3, data = schizow,
trtvar = 'tx', algorithm = 'jags', method="MAR",
ord_cov_dummy = FALSE, n.adapt = 10, n.chains = 1,
n.iter = 100, thin = 2, warn = FALSE, seed = 1234)
extdt = extract_MIdata(object=test, method="J2R",mi.setting=NULL, M=10, minspace=2)
result = miAnalyze(y6 ~ y1 + tx, data = extdt, pool = TRUE)
```
## Support
For any help with regards to using the package or if you find a bug please create a [GitHub issue](https://github.com/xsswang/remiod/issues).
## Reference