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, is already up and running.

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

Re: st: computing elasticities after using lpoly

From   Austin Nichols <>
Subject   Re: st: computing elasticities after using lpoly
Date   Sun, 28 Oct 2012 19:11:06 -0400

Bert Lloyd <>:
I do not understand your question; are you asking whether -lpoly-
computes consistent standard errors? If so, please read the manual
entry for  -lpoly- and the references therein.  If you mean CIs in my
example, there are none!

On Sat, Oct 27, 2012 at 10:43 PM, Bert Lloyd <> wrote:
> Dear Austin,
> This looks like a very clever solution. Do you have a sense of whether
> the confidence intervals are likely to be consistent? If not, would
> you recommend a bootstrapping approach?
> Thanks,
> BL
> On Tue, Oct 9, 2012 at 11:53 AM, Austin Nichols <> wrote:
>> Arka Roy Chaudhuri <>:
>> For a worked example, try:
>> webuse motorcycle, clear
>> lpoly accel time, deg(1) k(tri) bw(3) gen(x s)
>> qui levelsof x, loc(xs)
>> g double schk=.
>> g double b=.
>> loc i 1
>> qui foreach l of loc xs {
>>  gen double w=max(0,3-abs(time-`l'))
>>  reg accel time [aw=w]
>>  replace schk=_b[_cons]+_b[time]*`l' in `i'
>>  replace b=_b[time] in `i'
>>  drop w
>>  loc i=`i'+1
>>  }
>> assert float(s)==float(schk)
>> la var b "Slope"
>> la var s "Conditional mean"
>> sc s b x, msize(small small) c(l) name(slopes)
>> On Tue, Oct 9, 2012 at 10:56 AM, Austin Nichols <> wrote:
>>> Arka Roy Chaudhuri <>:
>>> You can also get the coefs from an -lpoly- graph by noting the kernel
>>> type, bandwidth, and degree, then estimating the weighted regressions
>>> yourself, saving the coefs each time.  If you specify the -generate(x
>>> s)- option you can also get all the X points at which regressions are
>>> estimated.
*   For searches and help try:

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