You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
PosiR provides tools for post-selection inference (PoSI) in linearregression models. Post-Selection Inference addresses the challenge ofperforming valid statistical inference after model selection, ensuringthat confidence intervals maintain their nominal coverage probability(e.g., 95%) even when the model is chosen based on the data. The packageimplements simultaneous confidence intervals using bootstrap-based max-tstatistics, following Algorithm 1 from Kuchibhotla, Kolassa, and Kuffner(2022).
Installation
You can install the development version ofPosiR from GitHub:
# Install devtools if not already installedif (!requireNamespace("devtools",quietly=TRUE)) { install.packages("devtools")}# Install PosiRdevtools::install()# Optional dependencies for vignette and examplesinstall.packages(c("dplyr","pbapply"))
Example: Simultaneous Confidence Intervals
This example demonstrates how to usesimultaneous_ci() to computesimultaneous confidence intervals for regression coefficients across aset of models:
The outputresult$intervals provides the coefficient estimates andsimultaneous 95% confidence intervals for each model inQ. Forexample:
The(Intercept) andX1 intervals inmodel1 should contain theirtrue values (1 and 0.5, respectively).
The intervals are wider than naive intervals to account for modelselection uncertainty, ensuring valid coverage across all models inQ.
Learn More
Vignette: Runvignette(“Vignette”).
Source Paper: Kuchibhotla, A., Kolassa, J., & Kuffner, T. (2022).Post-selection inference. Annual Review of Statistics and ItsApplication, 9(1), 505–527. DOI:10.1146/annurev-statistics-100421-044639.
About
Post-Selection Inference via Simultaneous Confidence Intervals