Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

RE: st: variable format


From   Grace Jessie <[email protected]>
To   <[email protected]>
Subject   RE: st: variable format
Date   Sat, 19 Mar 2011 05:05:11 +0000

Nick,
thank you again!
 
Grace


----------------------------------------
> Date: Fri, 18 Mar 2011 09:24:06 +0000
> Subject: Re: st: variable format
> From: [email protected]
> To: [email protected]
>
> You'd need to do this in advance of the -graph- command. That is, the
> values or value labels of the -by()- variable would need to include
> whatever text you want. Here the main technique is exactly as
> explained to you in another thread.
>
> set obs 4
> gen u = uniform()
> expand 10
> gen y = rnormal()
> gen x = y+rnormal()
> gen sru = "original " + string(u, "%2.1f")
> scatter y x,by(sru)
>
> Other cases could involve defining value labels, or fixing ad hoc in
> the Graphics Editor.
>
> Nick
>
> 2011/3/18 Grace Jessie :
> >
> > The link you provided seems to solve the problem with only one constant to display as someone likes.
> > In the posting, Al Feiveson's graph is repeated by subgroups, which results in different values in subgroups. How to invoke the macro with by option (i.e., different subgroups) within the graph command?
> >
> > What Al Feiveson takes for example is as follows.
> >
> > set obs 4
> > gen u = uniform()
> > gen ru = round(u,.01)
> > expand 10
> > gen y = rnormal()
> > gen x = y+rnormal()
> > scatter y x,by(ru)
> >
>
> *
> * 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/ 		 	   		  
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index