Nonparametric estimation and hypothesis testing in econometric models