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

st: RE: ltable and plot


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: ltable and plot
Date   Sat, 29 Nov 2003 14:37:55 -0000

Here's a silly example of how to use -plot()-. 

. ltable time censor if treat == 0, 
	graph plot(function y = 1 - exp(-1), ra(time)) 

The test is that the argument of -plot- could fit within 

. twoway <argument of plot> 

e.g. 

. twoway function y = 1 - exp(-1), ra(t) 

i.e. it could stand on its own -twoway- feet. 

You want something like 

. ltable time censor if treat == 0, 
	graph plot((rspike <whatever>)(connected <morestuff>)) 

where the <whatever> and <morestuff> are for the case 

if treat == 1 

However, the (temporary) variables in <whatever> etc. don't even 
exist when you call -ltable-, quite apart from some 
other difficulties, so I doubt that this will work. 

-plot()- does offer a handle for those who know how 
to use it; but here it's offering rather less of a handle than 
implied (or inferred), or so I guess. 

Another handle which would be useful is for -ltable- 
to generate as variables the quantities it tabulates; 
then you could knit your own graph. 

Nick 
[email protected] 

Marcello Pagano
 
> Has anyone had experience using the -plot- function with -ltable-?
> To be specific:
> . ltable time censor,  graph by(treat)
> works fine and it gives me two graphs side by side, each 
> with a single
> line--treat takes on two values: 0 & 1.
> What I want is the two lines on a *single* graph.  
> Allegedly the command
> -plot- is supposed to do just this, according to the 
> documentation.  But the
> documented explanation is rather poor, and no example is provided.
> 
> I know a workaround, but I am curious to see how -plot- 
> should work here.
> Any help would be appreciated.

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