science.js icon indicating copy to clipboard operation
science.js copied to clipboard

Stata Lpoly: Can this be replicated in science.js?

Open lapidus opened this issue 9 years ago • 0 comments

Before diving in head-first, great if someone can give me an indication if I am likely to succeed in mirroring Stata's Lpoly function with Science.js.

//The Stata function:
lpoly yVar xVar [aweight=weight_example], at(xVar) bwidth(7) gen(outputVariable)  

lpoly performs a kernel-weighted local polynomial regression of yvar on xvar and displays a graph of the smoothed values with (optional) confidence bands.

http://www.stata.com/manuals13/rlpoly.pdf

ps. I think my main concern is about the application of weights. In the example above I am using Stata's aweight ("Analytic weights"). Is there an equivalent of this in science.js?

Thank you!

lapidus avatar Mar 07 '17 07:03 lapidus