|
| 1 | +--- |
| 2 | +title: "R vs SAS Reference-Based Multiple Imputation (joint modelling): Continuous Data" |
| 3 | +--- |
| 4 | + |
| 5 | +```{r setup, include=FALSE} |
| 6 | +knitr::opts_chunk$set(echo = TRUE) |
| 7 | +``` |
| 8 | + |
| 9 | +# Reference-Based Multiple Imputation Comparison |
| 10 | + |
| 11 | +The following table shows the types of reference-based multiple imputation (rbmi), the capabilities of each language, and whether or not the results from each language match. The following holds for data that are assumed to be normally distributed. In this comparison, we used the [rbmi](https://cran.r-project.org/web/packages/rbmi/index.html) package in R and the so-called [Five macros](https://www.lshtm.ac.uk/research/centres-projects-groups/missing-data#dia-missing-data) in SAS. |
| 12 | + |
| 13 | +The following assumptions are made in both languages: |
| 14 | + |
| 15 | +* Equal unstructured covariance matrix across treatment groups |
| 16 | + |
| 17 | +* Same covariates formula for the imputation and analysis model |
| 18 | + |
| 19 | +* Similar number of MCMC tuning parameters (burn-in, thinning) was used in the MCMC |
| 20 | + |
| 21 | +* The one intermittent missingness was imputed under MAR assumption |
| 22 | + |
| 23 | +| Analysis | Supported in R | Supported in SAS | Results Match | Notes | |
| 24 | +|----------|----------------|------------------|---------------|-------| |
| 25 | +| rbmi - MI MAR | [Yes](../R/rbmi_continuous_joint.html) | [Yes](../SAS/rbmi_continuous_joint_SAS.html) | Yes | Results will be (slightly) different given the randomness in multiple imputations | |
| 26 | +| rbmi - MI MNAR Copy Reference | [Yes](../R/rbmi_continuous_joint.html) | [Yes](../SAS/rbmi_continuous_joint_SAS.html) | Yes | Results will be (slightly) different given the randomness in multiple imputations | |
| 27 | +| rbmi - MI MNAR Jump to Reference | [Yes](../R/rbmi_continuous_joint.html) | [Yes](../SAS/rbmi_continuous_joint_SAS.html) | Yes | Results will be (slightly) different given the randomness in multiple imputations | |
| 28 | +| rbmi - MI MNAR Copy Increments in Reference | [Yes](../R/rbmi_continuous_joint.html) | [Yes](../SAS/rbmi_continuous_joint_SAS.html) | Yes | Results will be (slightly) different given the randomness in multiple imputations | |
| 29 | + |
| 30 | + |
| 31 | +## Comparison Results |
| 32 | +The following figure compares the contrast estimate (and associated 95% confidence interval) for the explored dataset per number of multiple imputations *M* (ie, 500, 2000 and 5000). Note that the complete case analysis is presented across *M* for completeness. For the contrast estimate the range of the difference between R and SAS results are [-0.29 to 2.21]%, [0.0 to 0.75]% and [-0.25 to 0.19]% for respectively M=500, 2000, 5000. |
| 33 | + |
| 34 | +```{r, echo=FALSE, fig.align='center', out.width="100%"} |
| 35 | +knitr::include_graphics("../images/rbmi/COMP_fig1.png") |
| 36 | +``` |
| 37 | +CC=Complete Case; MAR=Missing at Random; MNAR=Missing not at Random, CIR=Copy Increments in Reference; CR=Copy Reference; JR=Jump to Reference |
| 38 | + |
| 39 | + |
| 40 | +# Summary and Recommendation |
| 41 | +The computational time for M=500 was similar between the `rbmi` package and the `Five macros` with 26 and 23 seconds. However, for M=2000 the `Five macros` (44 seconds) was approximately double as fast than the `rbmi` package (92 seconds). |
| 42 | + |
| 43 | + |
0 commit comments