Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: possible nested loop with multiple items


From   "Dr. Bill Westman" <bigweb_ddt@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: possible nested loop with multiple items
Date   Fri, 30 Apr 2010 16:29:42 -0700 (PDT)

Nick:

Thanks.  While searching archives I tried something else which seems to also work and looks very similar to what you have. 

foreach i of varlist q*_num {;
local y = regexr("`i'", "_num", "_den");
g prop_`i' = `i' /`y';

I think this should work.

Thanks again!

Bill 


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index