https://github.com/adibender/elra-biostats

Open Source Code to reproduce analyses in Biostatistics publication (2018)

https://github.com/adibender/elra-biostats

Science Score: 36.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
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Open Source Code to reproduce analyses in Biostatistics publication (2018)

Basic Info
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 3
  • Open Issues: 0
  • Releases: 1
Created almost 9 years ago · Last pushed over 8 years ago
Metadata Files
Readme

README.md

Evaluation of the association between nutritional adequacy and survival

DOI

This is the Code and Data repository for:

Andreas Bender, Fabian Scheipl, Wolfgang Hartl, Andrew G Day, Helmut Küchenhoff; Penalized estimation of complex, non-linear exposure-lag-response associations, Biostatistics, , kxy003, https://doi.org/10.1093/biostatistics/kxy003

How to rerun analysis:

Rerunning the analysis involves 4 steps:

  1. Preprocess raw data and create data in piece-wise exponential format
  2. Estimate models (main and sensitivity) + run alternative models with cumulative measures of nutrition (added at review stage)
  3. Rerun simulation analysis
    • Simulation Part B is independent of the application and could be run "in a vacuum"
    • For Simulation Part A the previous two steps are necessary
  4. Recreate Graphs and Tables used in the publication (assumes that all previous steps ran without errors)

To perform these steps in one, run the code below (your working directory should be set to the directory of the rerun-analyses.R file): r source("rerun-analyses.R")

This will perform steps 1-4 described above.

Remark on runtime/memory: The complexity of the model is very high (many parameters + penalization) and the data sets are also very large (~10k subject + data splitting). Therefore, to run the code (especially simulation studies), we recommend running the code on a server or a very powerful desktop. On our servers, we were able to rerun the entire analysis within 2 days.

Prerequisites

  • For parallel computations we use mclapply from the parallel package (which doesn't work on windows machines). When you execute the code on a windows machine, mclapply will probably fall back to the default mc.cores=1 and thus code will still run, but computation time will be increased greatly.

  • For parallel processing of model fits and simulation runs of Part B we use the BatchJobs and BatchExperiments packages (Bischl et al. https://www.jstatsoft.org/article/view/v064i11). For Simulation Part A we use the successor package batchtools (https://github.com/mllg/batchtools).

  • To use them it is necessary to setup your parallel execution environment (see files BatchJobs.R (server) and BatchJobsLocal.R (local) for examples). Setting max.jobs=1 in BatchJobsLocal.R will run code sequentially, which might take a while, especially for a full simulation rerun. Under Linux, make sure that you have execution privileges for the scripts in <your R library>/BatchJobs/bin/linux-helper. Note: If you only want to check, whether all of the above runs as expected, but don't want to fully replicate all simulations, reduce n_simA and n_simB in rerun-analyses.R.

Additional Notes

  • Simulation Study Part A (simulation/comparison/) is much more general and could be of interest for researchers interested in replicating/reusing the data structure and simulation (for example to test extensions of the method, etc.)

  • Simulation Study Part B was designed to closely resemble the application example, thus most code is hard coded (including functions in elrapack) and will not be of much use for general settings.

  • We currently develop an R package that facilitates working with PAMMs, including data preparation, visualization, etc.. There are also a lot of vignettes with application examples: http://github.com/adibender/pammtools

Folder structure

  • data: Raw data for the application example (after initial import from SAS and minor preprocessing)
  • dataGenerationScripts: Contains scripts for (further) data preprocessing. Creates folder dataCurrent and dataCurrentHosp (storing data for main and sensitivity an analysis, respectively). Run dataImportFromSAStoCleaned.R to process all data processing steps
  • elrapack: A minimal R-package containing helper functions for data preparation/evaluation and simulation. This package is not meant to be broadly used, but rather a convenience package for storing helper functions (will be installed locally at the beginning of the rerun-analyses.R script).
  • paper: Contains Scripts that produce tables and figures used in the publication.
  • runModelBatchJobs: Contains scripts to rerun main and sensitivity analyses of the application example
  • simulation: Scripts to rerun simulation studies
    • modelEvaluation: Scripts to rerun Simulation Part A
    • comparison: Scripts to rerun Simulation Part B

Session Info

Below you can find the session information of our R session:

```r sessionInfo()

R Under development (unstable) (2017-09-06 r73210)

Platform: x86_64-pc-linux-gnu (64-bit)

Running under: Debian GNU/Linux 8 (jessie)

Matrix products: default

BLAS: /usr/lib/libblas/libblas.so.3.0

LAPACK: /usr/lib/lapack/liblapack.so.3.0

locale:

[1] LCCTYPE=enUS.UTF-8 LC_NUMERIC=C

[3] LCTIME=enUS.UTF-8 LCCOLLATE=enUS.UTF-8

[5] LCMONETARY=enUS.UTF-8 LCMESSAGES=enUS.UTF-8

[7] LCPAPER=enUS.UTF-8 LC_NAME=C

[9] LCADDRESS=C LCTELEPHONE=C

[11] LCMEASUREMENT=enUS.UTF-8 LC_IDENTIFICATION=C

attached base packages:

[1] grid parallel stats graphics grDevices utils datasets

[8] methods base

other attached packages:

[1] tables0.8 Hmisc4.0-3 Formula_1.2-2

[4] lattice0.20-35 pec2.5.4 reshape2_1.4.3

[7] survival2.41-3 prodlim1.6.1 tidyr_0.7.2

[10] gridExtra2.3 pammtools0.0.3.2 purrr_0.2.4

[13] magrittr1.5 batchtools0.9.6 data.table_1.10.4-3

[16] ggplot22.2.1 tsModel0.6 dlnm_2.3.2

[19] bindrcpp0.2 dplyr0.7.4 BatchExperiments_1.4.1

[22] BatchJobs1.7 BBmisc1.11 mgcv_1.8-19

[25] nlme3.1-131 checkmate1.8.3 elrapack_0.0.3

loaded via a namespace (and not attached):

[1] bit640.9-7 splines3.5.0 foreach_1.4.3

[4] modelr0.1.1 assertthat0.2.0 expm_0.999-2

[7] latticeExtra0.6-28 base64url1.2 blob_1.1.0

[10] progress1.1.2 timereg1.9.1 numDeriv_2016.8-1

[13] RSQLite2.0 backports1.1.1 glue_1.2.0

[16] digest0.6.12 RColorBrewer1.1-2 colorspace_1.3-2

[19] htmltools0.3.6 cowplot0.8.0 Matrix_1.2-11

[22] plyr1.8.4 psych1.7.5 pkgconfig_2.0.1

[25] broom0.4.2 mvtnorm1.0-6 scales_0.5.0

[28] brew1.0-6 lava1.5 htmlTable_1.9

[31] tibble1.3.4 withr2.1.0 nnet_7.3-12

[34] lazyeval0.2.0 mnormt1.5-5 memoise_1.1.0

[37] msm1.6.5 foreign0.8-69 tools_3.5.0

[40] prettyunits1.0.2 stringr1.2.0 sendmailR_1.2-1

[43] munsell0.4.3 cluster2.0.6 compiler_3.5.0

[46] rlang0.1.4 iterators1.0.8 htmlwidgets_0.9

[49] rappdirs0.3.1 base64enc0.1-3 labeling_0.3

[52] gtable0.2.0 codetools0.2-15 DBI_0.7

[55] R62.2.2 zoo1.8-0 knitr_1.17

[58] bit1.1-12 bindr0.1 stringi_1.1.6

[61] Rcpp0.12.14 rpart4.1-11 acepack_1.4.1

[64] tidyselect_0.2.3

devtools::session_info()

Session info ------------------------------------------------------------------

setting value

version R Under development (unstable) (2017-09-06 r73210)

system x86_64, linux-gnu

ui X11

language en_US:en

collate en_US.UTF-8

tz Europe/Berlin

date 2017-12-24

Packages ----------------------------------------------------------------------

package * version date source

acepack 1.4.1 2016-10-29 CRAN (R 3.5.0)

assertthat 0.2.0 2017-04-11 CRAN (R 3.5.0)

backports 1.1.1 2017-09-25 cran (@1.1.1)

base * 3.5.0 2017-09-07 local

base64enc 0.1-3 2015-07-28 CRAN (R 3.5.0)

base64url 1.2 2017-06-14 CRAN (R 3.5.0)

BatchExperiments * 1.4.1 2015-03-18 CRAN (R 3.5.0)

BatchJobs * 1.7 2017-11-28 cran (@1.7)

batchtools * 0.9.6 2017-09-06 CRAN (R 3.5.0)

BBmisc * 1.11 2017-03-10 CRAN (R 3.5.0)

bindr 0.1 2016-11-13 CRAN (R 3.5.0)

bindrcpp * 0.2 2017-06-17 CRAN (R 3.5.0)

bit 1.1-12 2014-04-09 CRAN (R 3.5.0)

bit64 0.9-7 2017-05-08 CRAN (R 3.5.0)

blob 1.1.0 2017-06-17 CRAN (R 3.5.0)

brew 1.0-6 2011-04-13 CRAN (R 3.5.0)

broom 0.4.2 2017-02-13 CRAN (R 3.5.0)

checkmate * 1.8.3 2017-07-03 CRAN (R 3.5.0)

cluster 2.0.6 2017-03-10 CRAN (R 3.5.0)

codetools 0.2-15 2016-10-05 CRAN (R 3.5.0)

colorspace 1.3-2 2016-12-14 CRAN (R 3.5.0)

compiler 3.5.0 2017-09-07 local

cowplot 0.8.0 2017-07-30 CRAN (R 3.5.0)

data.table * 1.10.4-3 2017-10-27 cran (@1.10.4-)

datasets * 3.5.0 2017-09-07 local

DBI 0.7 2017-06-18 CRAN (R 3.5.0)

devtools 1.13.3 2017-08-02 CRAN (R 3.5.0)

digest 0.6.12 2017-01-27 CRAN (R 3.5.0)

dlnm * 2.3.2 2017-01-16 CRAN (R 3.5.0)

dplyr * 0.7.4 2017-09-28 cran (@0.7.4)

elrapack * 0.0.3 2017-12-13 local (@0.0.3)

expm 0.999-2 2017-03-29 CRAN (R 3.5.0)

foreach 1.4.3 2015-10-13 CRAN (R 3.5.0)

foreign 0.8-69 2017-06-22 CRAN (R 3.5.0)

Formula * 1.2-2 2017-07-10 CRAN (R 3.5.0)

ggplot2 * 2.2.1 2016-12-30 CRAN (R 3.5.0)

glue 1.2.0 2017-10-29 cran (@1.2.0)

graphics * 3.5.0 2017-09-07 local

grDevices * 3.5.0 2017-09-07 local

grid * 3.5.0 2017-09-07 local

gridExtra * 2.3 2017-09-09 cran (@2.3)

gtable 0.2.0 2016-02-26 CRAN (R 3.5.0)

Hmisc * 4.0-3 2017-05-02 CRAN (R 3.5.0)

htmlTable 1.9 2017-01-26 CRAN (R 3.5.0)

htmltools 0.3.6 2017-04-28 CRAN (R 3.5.0)

htmlwidgets 0.9 2017-07-10 CRAN (R 3.5.0)

iterators 1.0.8 2015-10-13 CRAN (R 3.5.0)

knitr 1.17 2017-08-10 CRAN (R 3.5.0)

labeling 0.3 2014-08-23 CRAN (R 3.5.0)

lattice * 0.20-35 2017-03-25 CRAN (R 3.5.0)

latticeExtra 0.6-28 2016-02-09 CRAN (R 3.5.0)

lava 1.5 2017-03-16 CRAN (R 3.5.0)

lazyeval 0.2.0 2016-06-12 CRAN (R 3.5.0)

magrittr * 1.5 2014-11-22 CRAN (R 3.5.0)

Matrix 1.2-11 2017-08-21 CRAN (R 3.5.0)

memoise 1.1.0 2017-04-21 CRAN (R 3.5.0)

methods * 3.5.0 2017-09-07 local

mgcv * 1.8-19 2017-09-01 CRAN (R 3.5.0)

mnormt 1.5-5 2016-10-15 CRAN (R 3.5.0)

modelr 0.1.1 2017-07-24 CRAN (R 3.5.0)

msm 1.6.5 2017-12-05 cran (@1.6.5)

munsell 0.4.3 2016-02-13 CRAN (R 3.5.0)

mvtnorm 1.0-6 2017-03-02 CRAN (R 3.5.0)

nlme * 3.1-131 2017-02-06 CRAN (R 3.5.0)

nnet 7.3-12 2016-02-02 CRAN (R 3.5.0)

numDeriv 2016.8-1 2016-08-27 CRAN (R 3.5.0)

pammtools * 0.0.3.2 2017-12-10 Github (adibender/pammtools@2f5a6d0)

parallel * 3.5.0 2017-09-07 local

pec * 2.5.4 2017-08-08 CRAN (R 3.5.0)

pkgconfig 2.0.1 2017-03-21 CRAN (R 3.5.0)

plyr 1.8.4 2016-06-08 CRAN (R 3.5.0)

prettyunits 1.0.2 2015-07-13 CRAN (R 3.5.0)

prodlim * 1.6.1 2017-03-06 CRAN (R 3.5.0)

progress 1.1.2 2016-12-14 CRAN (R 3.5.0)

psych 1.7.5 2017-05-03 CRAN (R 3.5.0)

purrr * 0.2.4 2017-10-18 cran (@0.2.4)

R6 2.2.2 2017-06-17 CRAN (R 3.5.0)

rappdirs 0.3.1 2016-03-28 CRAN (R 3.5.0)

RColorBrewer 1.1-2 2014-12-07 CRAN (R 3.5.0)

Rcpp 0.12.14 2017-11-23 cran (@0.12.14)

reshape2 * 1.4.3 2017-12-11 cran (@1.4.3)

rlang 0.1.4 2017-11-05 cran (@0.1.4)

rpart 4.1-11 2017-03-13 CRAN (R 3.5.0)

RSQLite 2.0 2017-06-19 CRAN (R 3.5.0)

scales 0.5.0 2017-08-24 CRAN (R 3.5.0)

sendmailR 1.2-1 2014-09-21 CRAN (R 3.5.0)

splines 3.5.0 2017-09-07 local

stats * 3.5.0 2017-09-07 local

stringi 1.1.6 2017-11-17 cran (@1.1.6)

stringr 1.2.0 2017-02-18 CRAN (R 3.5.0)

survival * 2.41-3 2017-04-04 CRAN (R 3.5.0)

tables * 0.8 2017-01-03 CRAN (R 3.5.0)

tibble 1.3.4 2017-08-22 CRAN (R 3.5.0)

tidyr * 0.7.2 2017-10-16 cran (@0.7.2)

tidyselect 0.2.3 2017-11-06 cran (@0.2.3)

timereg 1.9.1 2017-05-21 CRAN (R 3.5.0)

tools 3.5.0 2017-09-07 local

tsModel * 0.6 2013-06-24 CRAN (R 3.5.0)

utils * 3.5.0 2017-09-07 local

withr 2.1.0 2017-11-01 cran (@2.1.0)

zoo 1.8-0 2017-04-12 CRAN (R 3.5.0)

```

Owner

  • Name: Andreas Bender
  • Login: adibender
  • Kind: user
  • Company: LMU

GitHub Events

Total
Last Year

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 13
  • Total Committers: 1
  • Avg Commits per committer: 13.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Andreas Bender b****R@g****m 13

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • adibender (4)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

elrapack/DESCRIPTION cran
  • R >= 3.4.1 depends
  • BatchExperiments * imports
  • BatchJobs * imports
  • batchtools * imports
  • checkmate * imports
  • dplyr * imports
  • ggplot2 * imports
  • grid * imports
  • gridExtra * imports
  • knitr * imports
  • lubridate * imports
  • mgcv * imports
  • modelr * imports
  • msm * imports
  • parallel * imports
  • pec * imports
  • plyr * imports
  • prodlim * imports
  • reshape2 * imports
  • stringr * imports
  • survival * imports
  • tidyr * imports
  • zoo * imports