Supplementary material and reproducible research files for article “A joint Bayesian framework for missing data and measurement error using integrated nested Laplace approximations”
Preprint: arxiv.org/abs/2303.15240
Authors: Skarstein, E., Martino, S., Muff, S.
This supplementary material was written by Skarstein, E., but code for analysis was developed jointly between authors.
In case of any questions or comments, please do not hesitate to contact emma.s.skarstein@ntnu.no!
This website contains scripts, tutorials and data to reproduce all analysis and figures from the manuscript.
Examples
These include scripts to run the code for analysis, including comments and explanations.
For a step-by-step introduction with detailed explanations, see Simulation example. This is a single sun of the simulation study shown in the paper, and the full code for the study can be found in Simulation study. The data and model used in these examples reflect the most general case where we have a covariate with classical and Berkson measurement error, as well as missing data. For many users inlabru
might be more intuitive than plain INLA, and so we have also included the same model implemented in inlabru
in Example in inlabru
.
The remaining examples are variations on the above model using different data sets, see the table below for an overview of the different types of ME in the different examples.
Example | Classical ME | Berkson ME | Missing data |
---|---|---|---|
Missing covariate imputation | x | ||
Missing and mismeasured covariate | x | x | |
Simulation study | x | x | x |
Simulation example | x | x | x |
Example in inlabru |
x | x | x |
Datasets
All the data sets that are used in the paper can be downloaded manually from the GitHub repository, or directly in R as specified in the data descriptions.
Session info
The code was written and run in R with the following software versions:
inla.version()
R-INLA version ..........: 22.05.07
Date ....................: Sat May 7 12:43:31 PM +03 2022 (Version_22.05.07)
Maintainers .............: Havard Rue <hrue@r-inla.org>
: Finn Lindgren <finn.lindgren@gmail.com>
: Elias Teixeira Krainski <elias@r-inla.org>
Main web-page ...........: www.r-inla.org
Download-page ...........: inla.r-inla-download.org
Repository ..............: github.com/hrue/r-inla
Email support ...........: help@r-inla.org
: r-inla-discussion-group@googlegroups.com
Current session info
─ Session info ───────────────────────────────────────────────────────────────
setting value4.2.1 (2022-06-23)
version R version 10.16
os macOS Big Sur ... .0
system x86_64, darwin17
ui X11language (EN)
-8
collate en_US.UTF-8
ctype en_US.UTF/Oslo
tz Europe2023-09-01
date 3.1.1 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/ (via rmarkdown)
pandoc
─ Packages ───────────────────────────────────────────────────────────────────* version date (UTC) lib source
package 7.3-20 2022-01-16 [1] CRAN (R 4.2.1)
class 0.4-9 2023-02-28 [1] CRAN (R 4.2.0)
classInt 3.6.1 2023-03-23 [1] CRAN (R 4.2.0)
cli 0.2-18 2020-11-04 [1] CRAN (R 4.2.1)
codetools 2.1-0 2023-01-23 [1] CRAN (R 4.2.0)
colorspace 1.1.3 2022-06-18 [1] CRAN (R 4.2.0)
DBI 1.7-13 2023-02-01 [1] CRAN (R 4.2.0)
e1071 1.0.4 2023-01-22 [1] CRAN (R 4.2.0)
fansi 2.1.1 2022-07-06 [1] CRAN (R 4.2.0)
farver * 1.5.2 2022-02-02 [1] CRAN (R 4.2.0)
foreach 3.4.3 2023-08-14 [1] CRAN (R 4.2.0)
ggplot2 1.6.2 2022-02-24 [1] CRAN (R 4.2.0)
glue 0.3.3 2023-03-21 [1] CRAN (R 4.2.0)
gtable * 22.05.07 2022-05-07 [1] local
INLA 2.7.0 2022-12-02 [1] CRAN (R 4.2.1)
inlabru 0.2.7 2022-12-20 [1] CRAN (R 4.2.0)
isoband 1.0.14 2022-02-05 [1] CRAN (R 4.2.0)
iterators 2.23-20 2021-05-03 [1] CRAN (R 4.2.1)
KernSmooth 0.4.2 2020-10-20 [1] CRAN (R 4.2.0)
labeling 0.20-45 2021-09-22 [1] CRAN (R 4.2.1)
lattice 1.0.3 2022-10-07 [1] CRAN (R 4.2.0)
lifecycle 2.0.3 2022-03-30 [1] CRAN (R 4.2.0)
magrittr 7.3-57 2022-04-22 [1] CRAN (R 4.2.1)
MASS * 1.4-1 2022-03-23 [1] CRAN (R 4.2.1)
Matrix 0.5-1 2022-09-11 [1] CRAN (R 4.2.0)
MatrixModels 1.8-40 2022-03-29 [1] CRAN (R 4.2.1)
mgcv 0.5.0 2018-06-12 [1] CRAN (R 4.2.0)
munsell 3.1-157 2022-03-25 [1] CRAN (R 4.2.1)
nlme 1.1.2 2022-08-19 [1] CRAN (R 4.2.0)
patchwork 1.9.0 2023-03-22 [1] CRAN (R 4.2.0)
pillar 2.0.3 2019-09-22 [1] CRAN (R 4.2.0)
pkgconfig 1.8.8 2022-11-11 [1] CRAN (R 4.2.0)
plyr 0.4-27 2022-06-09 [1] CRAN (R 4.2.0)
proxy 2.5.1 2021-08-19 [1] CRAN (R 4.2.0)
R6 1.1-3 2022-04-03 [1] CRAN (R 4.2.0)
RColorBrewer 1.0.11 2023-07-06 [1] CRAN (R 4.2.0)
Rcpp 1.5-32 2022-05-09 [1] CRAN (R 4.2.0)
rgdal 1.1.1 2023-04-28 [1] CRAN (R 4.2.0)
rlang 1.1.4 2023-05-17 [1] CRAN (R 4.2.0)
s2 1.2.1 2022-08-20 [1] CRAN (R 4.2.0)
scales 1.0-14 2023-07-11 [1] CRAN (R 4.2.0)
sf * 2.0-0 2023-06-22 [1] CRAN (R 4.2.0)
sp 3.2.1 2023-03-20 [1] CRAN (R 4.2.0)
tibble 0.8-3 2023-08-10 [1] CRAN (R 4.2.0)
units 1.2.3 2023-01-31 [1] CRAN (R 4.2.0)
utf8 0.6.3 2023-06-14 [1] CRAN (R 4.2.0)
vctrs 0.4.2 2023-05-02 [1] CRAN (R 4.2.0)
viridisLite 2.5.0 2022-03-03 [1] CRAN (R 4.2.0)
withr 0.7.3 2023-05-06 [1] CRAN (R 4.2.0)
wk
1] /Library/Frameworks/R.framework/Versions/4.2/Resources/library
[
──────────────────────────────────────────────────────────────────────────────