  We propose novel estimators for categorical and continuous treatments by
using an optimal covariate balancing strategy for inverse probability
weighting. The resulting estimators are shown to be consistent and
asymptotically normal for causal contrasts of interest, either when the model
explaining treatment assignment is correctly specified, or when the correct set
of bases for the outcome models has been chosen and the assignment model is
sufficiently rich. For the categorical treatment case, we show that the
estimator attains the semiparametric efficiency bound when all models are
correctly specified. For the continuous case, the causal parameter of interest
is a function of the treatment dose. The latter is not parametrized and the
estimators proposed are shown to have bias and variance of the classical
nonparametric rate. Asymptotic results are complemented with simulations
illustrating the finite sample properties. Our analysis of a data set suggests
a nonlinear effect of BMI on the decline in self reported health.
