Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: statalist-digest V4 #2811


From   Kit Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: statalist-digest V4 #2811
Date   Thu, 6 Sep 2007 06:41:36 -0400

David Kantor gave a good solution to this problem. You might also want to read through "A little bit of Stata programming goes a long way'", available from my RePEc homepage below. It speaks directly to ways in which you can automate repetitive actions in Stata.


Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


On Sep 6, 2007, at 2:33 AM, Georgiana wrote:


generate limitdur1=0
replace limitdur1=lhcaly1 if ladura1 == .
replace limitdur1=ladura1 if lhcaly1 == .

generate limitdur2=0
replace limitdur2=lhcaly2 if ladura2 == .
replace limitdur2=ladura2 if lhcaly2 == .

generate limitdur3=0
replace limitdur3=lhcaly3 if ladura3 == .
replace limitdur3=ladura3 if lhcaly3 == .

and so on...

Is there an easier way to do this?
*
*   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