Support for Function gam()
USAGE:
gam.nlchisq(qr, resid, w, s)
This is support for the function gam(). It is not intended to be called directly by users.