--- On Sat, 28/11/09, L S <[email protected]> wrote:
> I would like to graph a nonparametric regression of y on
> x. The graph should include 95% confidence intervals for
> the nonparametric regression which account for clustering
> of the errors over each individual in the data
What about (you can add more graphs to this plot using the
-addplot()- option):
*----------------- begin example -----------------
clear
set obs 100
set seed 1234
gen id = _n
gen e = uniform()
expand 5
gen x = uniform()
gen y = -.6 + 1.4*x^.5 + .5*(x>.5) + e
fracpoly reg y x, cluster(id)
fracplot
*------------------ end example ------------------
Hope this helps,
Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* 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/