Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Shan Zhizhong <victor.shan@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Multivariate kernel regression |

Date |
Wed, 17 Oct 2012 10:15:21 -0700 |

Hi, Josh: You can find a stata package on partial identification bounds approach from Charles Manski's webpage. In the package, you can find an ado kernreg, which can deal with up to 4 covariates multivariate kernel regression. The command supports user-defined bandwidth or silverman's rule-of-thumb bandwidth. The link and instruction of the package is on the bottom of the webpage: http://faculty.wcas.northwestern.edu/~cfm754/. Best, Zhizhong Shan On Wed, Oct 17, 2012 at 10:04 AM, Josh Hyman <hyman.josh@gmail.com> wrote: > Hi Austin (and others), > > Thank you very much for your reply. Sorry about my delayed response - > I wanted to investigate more to make sure I understood your > suggestion. > > I'm not sure your suggestion gets me exactly what I was looking for, > and I want to clarify. My reference to -lpoly- in my initial post may > have been confusing. I don't actually want to do kernel-weighted local > regressions. I want to estimate "multivariate kernel regression", > which to my understanding, doesn't actually involve any regressions at > all. It takes the weighted average of Y for all observations near to > the particular value of X, weighted using the kernel function. And > where X represents more than 2 variables. So, this actually seems the > same to me as multivariate kernel density estimation, which I also > don't see any user-written commands for in Stata. What I am looking > for, I guess is like a version of -kdens2- that allows for more than > one "xvar", and wouldn't output a graph (since it would be in greater > than 3 dimensions), but rather would output the fitted or predicted > values of the Y (like -predict, xb-) for each observation. > > Regardless, it sounds like given your suggestion, one way to do this > is to loop over all possible combinations of the values of the X > variables and calculate the weighted Y for each combination using the > kernel of my choice? Please let me know if this would be your > suggestion, or if given my further clarification, if you know of any > user-written commands in Stata to do this, or if you have any other > suggestions. > > Thanks a lot for your help, and sorry again for the delayed response. > Josh > > > On Fri, Oct 12, 2012 at 3:31 PM, Austin Nichols <austinnichols@gmail.com> wrote: >> Josh Hyman <hyman.josh@gmail.com>: >> If you know the multivariate kernel you want to use, and the grid you >> want to smooth over, it is straightforward to loop over the grid and >> compute the regressions. To program a general estimator for a wide >> class of kernels would be substantially more work. See e.g. -kdens- >> on SSC and >> http://fmwww.bc.edu/repec/bocode/m/mf_mm_kern >> http://fmwww.bc.edu/RePEc/bocode/k/kdens.pdf >> >> A simple conic (triangle) kernel in 2 dimensions is easiest, see e.g. >> http://fmwww.bc.edu/repec/bocode/t/tddens >> >> On Fri, Oct 12, 2012 at 1:49 PM, Josh Hyman <hyman.josh@gmail.com> wrote: >>> Dear Statalist users, >>> >>> I am trying to figure out if there is a way in Stata to perform >>> multivariate kernel regression. I have investigated online and on the >>> Statalist, but with no success. What I am looking for would be similar >>> conceptually to the -lpoly- command, but with the ability to enter more >>> than one "xvar". >>> >>> If there are no Stata commands to do this (user-written or otherwise), then >>> do you recommend coding up a program to do this manually? I have used Stata >>> for many years, and written programs before, but have never had to code up >>> a regression manually. If you have suggestions on how to do this, or >>> resources to consult, that would be greatly appreciated. >>> >>> Please let me know if I can provide any other information. Thank you for >>> your consideration, >>> Josh Hyman >>> Economics doctoral candidate >>> University of Michigan >> * >> * For searches and help try: >> * http://www.stata.com/help.cgi?search >> * http://www.stata.com/support/faqs/resources/statalist-faq/ >> * http://www.ats.ucla.edu/stat/stata/ > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**References**:**st: Multivariate kernel regression***From:*Josh Hyman <hyman.josh@gmail.com>

**Re: st: Multivariate kernel regression***From:*Austin Nichols <austinnichols@gmail.com>

**Re: st: Multivariate kernel regression***From:*Josh Hyman <hyman.josh@gmail.com>

- Prev by Date:
**Re: st: Multivariate kernel regression** - Next by Date:
**st: generating a continuous sequence** - Previous by thread:
**Re: st: Multivariate kernel regression** - Next by thread:
**Re: st: Multivariate kernel regression** - Index(es):