Notes on correspondence between this implementation and other software can be found in comments at the bottom of R/alpha.R and R/beta.R.