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

RE: st: Graphs and Log files

From   Ricardo Mora-Castrillo <>
Subject   RE: st: Graphs and Log files
Date   Wed, 11 Dec 2002 18:29:04 -0600


I am sorry. That´s what I needed, you were right.


At 12:09 AM 12/12/2002 +0000, you wrote:
Ricardo Mora-Castrillo

> Now I am trying to run this in a more efficient way?? Does
> any of you have an idea?
> foreach varx0 of varlist pill0 iud0 vag0 condom0 rhythm0
> withd0 stfem0
> stmasc0 inject0 {
> foreach varx1 of varlist pill1 iud1 vag1 condom1 rhythm1
> withd1 stfem1
> stmasc1 inject1 {
>    graph `varx0'`varx1' year, symbol(i i) connect(l l[.])
> xscale(1975,2000)
> yscale(0,1) saving(`varx0', replace)
> }
> }

The two nested loops will produce 9 * 9
graphs. I suspect you want just 9 graphs, as in

foreach v in pill iud vag condom rhythm withd stfem stmasc inject {
        graph `v'0 `v'1 year, symbol(ii) connect(ll[.]) /*
      */ xscale(1975,2000) yscale(0,1) saving(`v', replace)


*   For searches and help try:
Ricardo Mora Castrillo
Graduate Student
Population Research Center
University of Texas, Austin

3908-B Avenue C
Austin, TX 78751
Telephone (512) 4671686

"Ella está en el horizonte -dice Fernando Birri-.
Me acerco dos pasos, ella se aleja dos pasos.
Camino diez pasos y el horizonte se corre diez pasos más allá.
Por mucho que yo camine, nunca la alcanzaré.
¿Para que sirve la utopía?
Para eso sirve: para caminar. "
(Eduardo Galeano)

*   For searches and help try:

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