-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
52 lines (36 loc) · 2.13 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# {simswjm}: Simulating Stepped Wedge Trials With and Without Informative Dropout
<!-- badges: start -->
[![R-CMD-check](https://github.com/RedDoorAnalytics/simswjm/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/RedDoorAnalytics/simswjm/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
The {simswjm} package can be used to simulate data from stepped wedge trials with a continuous, binary, or count longitudinal outcome.
Moreover, data can be simulated assuming both non-informative and informative dropout, with the dropout mechanism according to a joint longitudinal-survival model with shared random effects or (loosely) based on a mixed effects logistic regression model.
This package is a companion to the manuscript titled "Analysis of cohort stepped wedge cluster-randomized trials with non-ignorable dropout via joint modeling", which is currently submitted for publication.
A pre-print is [available on arXiv](https://arxiv.org/abs/2404.14840).
# Installation
You can install the development version of {simswjm} from [GitHub](https://github.com/RedDoorAnalytics/simswjm) with:
``` r
# install.packages("remotes")
remotes::install_github("RedDoorAnalytics/simswjm")
```
# Example code
Example code to fit mixed-effects and joint models using the simulated data is included within this repository as well, in the [`testing/`](https://github.com/RedDoorAnalytics/simswjm/tree/main/testing) folder.
Specifically, models are fit using the `gsem` command in Stata for continuous, binary, count outcomes; more details in [this file](https://github.com/RedDoorAnalytics/simswjm/blob/main/testing/02-testanalysis.do).
# Citation
If you find this useful, please cite it in your work:
```{r}
citation("simswjm")
```
# Issues
If you have any questions or feedback on the package or experience any bugs, please [file an issue on GitHub](https://github.com/RedDoorAnalytics/simswjm/issues).