completed following 'Applied Regression Modeling' textbook