Which one is the correct specification to estimate Nonparametric regressions with discrete and continuous, using local constant estimator? I was trying to implement manually the estimation of nonparametric regression using local-linear approximation with a mixture of discrete and continuous data.
consider a simple model:
$y=f(xc,xd)$
where xc is continuous and xd is discrete
Say that I want to estimate this model non parametrically. Which one of the two following regressions is the correct one (assuming local linear estimation.
1:
$$y=a0+a1*(xc-c)+e$$
2:
$$y=a0+a1*(xc-c)+a2*xd +e$$
Assume that both models are estimated using the correct kernel weights and that xd is a dummy.
I thought the correct model was (1), but npregress in Stata uses (2). Which one would be the correct one?
Thank you
EDIT:
Perhaps a different way to ask the same question.
Say that you have a 3 variables, y, xc (continuous) and xd (discrete), and that you want to estimate a nonparametric, using local linear kernel estimation, for:
$$y=f(xc,xd)$$
Empirically, how would you estimate this model using WLS? which one is the correct specification? equation 1  or equation 2 (assuming weights are appropriately obtained)
 A: Alright, So it took some time to find an official answer for this question. Or at least as official as possible, given my current access to bibliographic material.
So, based on Henderson and Parmeter (2015) section 8.1.2. the correct specification for a nonparametric regression with mixed data is derived as follows:

*

*Assume you are interested in estimating a nonparametric function for $y_i =m(x_i^c,x_i^d)+e_i$, where $x^c$ is continuous and $x^d$ is discrete.


*If the interest falls on using a Local linear estimator, one needs to obtain a taylor expansion to this function which is:
$$y_i\approx m(x)+\beta(x)(x^c_i-x_c) + e_i$$
Henderson and Parmeter (2015) indicate that for the LL estimator, one cannot obtain derivatives for discrete variables, so x_d does not appear in the specification directly.


*The coefficients $\delta(x) = (m(x), \beta(x)) $ can be estimated as the solution to:
$$min_{\delta(x)} = \sum { [(y-m(x)-\beta(x)(x_i-x_c) )^2]*W(X)} $$
where $W(X)$ is the kernel weight:
$$W(X) = K_h(x_i^c,x^c) * L_h (x_i^d,x^d)$$
In other words, the Discrete variables enter the regression only through the kernel weights.
Reference
Henderson, Daniel J., and Christopher F. Parmeter. Applied nonparametric econometrics. Cambridge University Press, 2015.
