Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: weights with Gaussian Kernel in lpoly, Stata 11


From   Nicolas Debarsy <ndebarsy@fundp.ac.be>
To   statalist@hsphsun2.harvard.edu
Subject   st: weights with Gaussian Kernel in lpoly, Stata 11
Date   Wed, 29 Aug 2012 11:18:32 +0200

Dear Statalist users,

In a nonparametric regression using the lpoly command, I would like to put different weights on observations.
However, when I want to use the Gaussian Kernel, I get the following error:

             cross():  3200  conformability error
  _lpoly_work():     -  function returned error
            <istmt>:     -  function returned error

For all the other kernels, the option [aw] runs.
Could you tell me if there is something special with the Gaussian kernel or if it is a bug in the lpoly ?
I'm using Stata 11.

Here is the code I used:

set obs 300
drawnorm x3 e
gen x32=x3^2
gen y=x3+2*x32+e
gen d=uniform()
lpoly y x3 [aw=d], kernel(gaussian)
lpoly y x3 [aw=d], kernel(epan2)

Already many thanks for your answer.
 Best,
Nicolas Debarsy


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index