Statalist


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

st: RE: combine two graphs of kernel local polynomial


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: combine two graphs of kernel local polynomial
Date   Fri, 6 Feb 2009 18:46:03 -0000

See the help for -lpoly-, which gives an answer. 

You can use -addplot()-. 

. lpoly <stuff>, addplot(lpoly <more stuff>) 

There is a subtle difference. The outer -lpoly- really is -lpoly- but
the inner -lpoly- is -twoway lpoly-. 

If all else fails, -generate- the results from two calls as distinct
variables and then superimpose scatter plots and smooth curves as
desired. 

Nick 
[email protected] 

Ana Gabriela Guerrero Serdan


I want to do a graph of two kernel local polynomial smoothing
regressions. 

I have done the following: 

.lpoly zscoresha2 Ageinmonths if treated==1 [aweight= expweigh],
noscatter ci
.graph copy Graph treated=1
.lpoly zscoresha2 Ageinmonths if treated==0 [aweight = expweigh],
noscatter ci
.graph copy Graph nontreated
.graph combine treated nontreated, ycommon xcommon


But I get two graphs next to each other. I see the same query in
Statalist but for twoway graphs. How can I combine the kernel polynomial
graphs into one? 

*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index