Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: access to rule-of-thumb bandwidth for local regressions
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: access to rule-of-thumb bandwidth for local regressions
Date
Mon, 17 Mar 2014 19:19:39 +0000
I probably don't understand this question as I can't see that looking
deep inside the code is the answer.
If you let -lpoly- choose bandwidth, it's shown rounded on the graph
and accessible thereafter as r(bandwidth). Alternatively you specify
the bandwidth you want. I have a sense that you want something else,
but I don't know what it is.
Nick
[email protected]
On 17 March 2014 19:06, László Sándor <[email protected]> wrote:
> Hi,
>
> My basic question is if there is any easy access to the bandwidth
> generated by -lpoly-, or if there is any other command that does
> optimal bandwidth calculations for local means (or local linear
> regressions etc.). I would appreciate the flexibility of existing code
> instead of me mocking up a restricted use cases.
>
> I had a look at -lpoly.ado-, and I see that most of the work is done
> my -_lpoly_work()- in Mata. I could not verify that this command is
> built in, but I could not locate the source code either.
>
> Though in the Mata call by -lpoly.ado-, I am not sure I see where the
> bandwidth even enters the calculation.
>
> mata: _lpoly_work(`degree',`pwidth', `l', `u', ///
> `doSE', &_lpoly_`kernel'(), `savevar')
>
> Thanks for any thoughts,
>
> Laszlo
> *
> * 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/