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

st: a fancier loop

From   Radu Ban <[email protected]>
To   Statalist ListServ <[email protected]>
Subject   st: a fancier loop
Date   Thu, 10 Apr 2003 14:21:26 -0400 (EDT)

dear all,

i have a set of variables gop1-gop9 greval1-greval9 gadd1-gadd9 and
several more like these, all postfixed from 1 to 9. each postfix has
a distinct meaning which i want to incorporate in a label.

i wrote this nested loop with paralel lists, but it doesn't run. can
anyone point the way out?

for 	X in any gop greval gadd gdeda gcl dyrb dyrd dsd dyre nop ncl \
	Y in any "gross opening" "gross addition by reval."
	"gross actual addition" "gross deduc. & adj." "gross closing"
	"depr. up to year beg." "depr. during year"
	"depr. adj. for sold/discarded" "depr. up to year close"
	"net opening" "net closing":

		for Z in num 1/9 \
		T in any "land" "building" "P&M" "transp. equip."
		"computers" "others" "subtot"
		"cap. work in prog." "total":
			label var XZ "fix. ass. T: Y";

or is not possible to accomplish this in one step?

thanks for your time,

Radu Ban

*   For searches and help try:

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