Having difficulty replicating default bandwidth for lpoly with STATA R manual pg 1369.
It is an a function that is not that intuitive and not well described so i wanted to give it a shot.
can't quite get the right values.
Here are the steps (done in the attached do file) as I see them
any advise?
thanks in advance
It is an a function that is not that intuitive and not well described so i wanted to give it a shot.
can't quite get the right values.
Here are the steps (done in the attached do file) as I see them
- polynomial degree =1
- set constant term C01(Kernel=Guassian)= 0.76865817
- run p+3 order global polynomial regression
- calculate derivative
der= (p + 1)! b[[p + 1]] + (p + 2)! b[[p +2]] x+ (p + 3)! b[[p + 3]] x^2/2
on eq 5.4 Fan Gijbels (1995) verified with R locpol package. (STATA manual
should document this step) Then sum the der^2 for denominator - get RSS from regression and std RSS of Schmidt[1973] for numerator candidate
- ROT =c01K*(num/denom))^(1/(2*p + 3))
- try on another dataset
any advise?
thanks in advance

Comment