Local regression, likelihood and density estimation