Estimation of propensity scores using generalized additive models