added mgcv functions

Changes to replace assist package functions with roughly equivalent functions from mgcv.