This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Reproduction of Andrew Gelman's blog post: | |
| # "Reanalysis of that Nobel prizewinning study of patents and innovation (with R and Stan code)" | |
| # https://statmodeling.stat.columbia.edu/2025/10/21/reanalysis-of-that-nobel-prizewinning-study-of-patents-and-innovation/ | |
| # This script installs packages, downloads data, compiles Stan models, and reproduces plots in one run. | |
| # ---- install-and-load ------------------------------------------------------ | |
| # Packages you need | |
| pkgs <- c("haven", "arm", "rstanarm", "MASS", "cmdstanr") | |
| # Ensure pak is available (fast, respects binaries) |