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

st: looping


From   Preeti Rao <preeti@irm.ernet.in>
To   statalist@hsphsun2.harvard.edu
Subject   st: looping
Date   Thu, 13 Jun 2002 00:09:11 +0530 (IST)

I would like to calculate the Lomodrs function for around 100 variables. 
I've named the variables var1, var2 .. I tried writing a small program, 
to put it in a loop, but am getting stuck someplace. Can someone please 
correct me? 

--------do-lomodr.do--------------
Set memory = 32000
Set matsize = 800
Program define calclomodr
Use d:\all_variable.dta
Local v = 1
	While 'v'  < 100
	Gen t = _n
	Tsset t
	Lomodrs var'v'
	Local v = 'v' + 1
End

Thanks,

Preeti Rao

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index