Efficient estimation of COM–Poisson regression and a generalized additive model