This repository contains the replication files for
Skinner, B.T. (2019). Making the connection: Broadband access and online course enrollment at public open admissions institutions. Research in Higher Education, 60(7), 960–999.
To run the core analyses, you will need the following programs on your machine (tested on MacOS):
To build all data, including broadband databases, you will need unar to unpack the large compressed files. The easiest way to get it is with homebrew:
brew install unar
You can also use Homebrew to update Bash, git, and sqlite if you want, though that shouldn't be necessary a relatively modern machine.
To replicate analysis and tables, clone or download the repository, and choose one of the following methods:
If your machine has make, simply run the makefile from the terminal
make
This makefile will
- download and install all required R packages
- download all required data files
- build/clean data
- run analyses
- knit tables/figures
At the top of the makefile, adjust the settings to best your machine. The defaults should work for most users:
# --- settings -----------------------------------
# set to https or ssh (probably https for most)
git_type := https
# cores (used when building cmdstan)
cores := 4
You can you can also run the scripts one by one. You will need to:
- Get the data files listed in
./data/README.md
- Build Broadband database using scripts in
./scripts/bash
cd ./scripts/bash
./make_bb.sh ../../data/broadband/zip ../../data/broadband .
- Download required R packages, found in
get_packages.R
- Clean IPEDS using
clean_ipeds.R
- Clean Broadband using
clean_bb.R
- Clean data using
clean_data.R
- Download and build CmdStan
- Compile
*.stan
model scripts - Run analyses using
./scripts/bash/run_stan.sh
# example call (assuming in ./scripts/bash directory)
./run_stan.sh ../stan/sl_normal ../../data/cleaned sl_normal full ../../output both ../r
- Make figures using
make_figures.R
- Knit tables and figures document using
table_figures.Rnw
NB Most R scripts assume command line arguments. If you are not using
makefile or calling from the command line, you will need to replace
args
object with a vector of the proper paths indicated in the files.