Inference and computation with generalized additive models and their extensions