I want to run a non-parametric regression of count of something as a dependent variable (say, number of crimes) on a continuous variable as a key variable (say, distance from subway stations). This would be the equivalent in a regression framework to a kernel density plot (twoway kdensity) with the same dependent and key variables. If I run the regression above using npregress, the analysis would average the dependent variable which takes value 1 in each row (in my case, each reported crime is a row in my dataset) within a specific kernel bandwidth. As in a twoway (kdensity), I would like the non-parametric regression to count the number of events in the dependent variable (crimes) instead of averaging them.
An alternative way to run the above regression would be to aggregate the dependent variable (crimes) into (spatial) units and then run an OLS regression. However, I am trying to use a non-parametric approach in my analysis. Any ideas on how to run my analysis in a non-parametric fashion? Thanks!
An alternative way to run the above regression would be to aggregate the dependent variable (crimes) into (spatial) units and then run an OLS regression. However, I am trying to use a non-parametric approach in my analysis. Any ideas on how to run my analysis in a non-parametric fashion? Thanks!
Comment