Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: locpoly


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: locpoly
Date   Tue, 28 Dec 2004 20:39:12 -0600

> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Fred Wolfe
> Sent: Tuesday, December 28, 2004 5:28 AM
> To: [email protected]
> Subject: st: locpoly
> 
> Unless I am mistaken, -locpoly- does not appear to observe graph options
> despite the assertion that it does in the help file.
> 
> . locpoly ptjntscr duration if ruse & dur <=30,nos ylab(5(1)15)
> xtitle(Duration of RA) degree(3)   parzen gen( x d)
> 
> does not honor graph options. However, using the d and x variables and
> graphing it myself, does display the options, as expected.
> 
> graph tw line d x,ylab(5(1)15) xtitle(Duration of RA)
> 
> Am I missing anything?
> 
> Thanks,
> 
> Fred
> 

Fred,

The problem seems to be when the -noscatter- option is used. 

In the locpoly.ado file if you add the -ytitle(`') xtitle(`') and `options'-
to the -graph twoway line- command (and save it as locpoly2) it will honor
the graphing options when the -noscatter- option is invoked.  

Below are lines 156 - 162 in -locpoly- :

graph twoway				///
	`scat'				///
(line `yhat' `xgrid',			///
	sort				///
	pstyle(p1)			///
	`rlopts' 		///
)	

If you add the options after `rlopts' so that it becomes:

graph twoway				///
	`scat'				///
(line `yhat' `xgrid',			///
	sort				///
	pstyle(p1)			///
	`rlopts' ytitle(`"`yttl'"') xtitle(`"`xttl'"')	`options'
///
)	

now the command will honor the graphing options when -noscatter- is used.

Incidentally, now the command will also respects line width, pattern, and
color with or without scatter.

Hope this helps,
Scott





*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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