Bivariate functions added

This commit involves adding functions for doing bivariate an analyses
that are specific to the paper.  This is a major recode.  All code has
been tested and is working fine.