Sample code for implementing post-selection inference methods in the structured life course modeling approach.
post-selection-inference.R
The R code shows how the p-values and the confidence intervals of the post-selection inference methods compared in this study can be computed in R, where X_hypos is the design matrix, y the outcome, and npred the number of predictors.
The code accompanies the following manuscript:
Zhu, Y., Simpkin, A. J., Suderman, M. J., Lussier, A. A., Walton, E., Dunn, E. C., & Smith, A. D. A. C. (2019). A structured approach to evaluating life course hypotheses: Moving beyond analyses of exposed versus unexposed in the omics context. MedRxiv, 19007062. https://doi.org/10.1101/19007062