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]

st: Looping or macro needed???


From   Jennifer A Hoff <jennifer.lindquist@duke.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Looping or macro needed???
Date   Thu, 2 Jun 2011 15:38:42 -0400

I am running a regression and calculating a couple of difference in 
difference using data set Mat070809_aaa.

Ie.    use "P:\ProjectName \Mat070809_aaa.dta"

I have the do file up and working for this one dataset.


I now need to repeat the same regression for 7 more data sets 
Mat070809_bbb, Mat070809_ccc, Mat070809_ddd, Mat070809_eee, Mat070809_fff, 

Mat070809_ggg, Mat070809_hhh 

I am a very new Stata user but it seems to beg for some type of looping or 

macro.

Especially when I anticipate having to re-run each of the 8 regressions 
with 3 strata!  - Running 24 separate do files seems inefficient.

Any suggestions?
---------------------------------------------------------------------------------------------------------
Jennifer Hoff Lindquist
Statistician
Health Services Research and Development
Mailing Address: 
VA Medical Center
508 Fulton Street (152)
Durham, NC 27705
(919) 286-0411 Ext. 4054 (New as of 5/18/09)
jennifer.lindquist@duke.edu
jennifer.lindquist@va.gov
---------------------------------------------------------------------------------------------------------

This communication and its attachments contain information from the Duke 
University Medical Center and/or Durham, NC, VA Medical Center and is 
intended for the exclusive use of the recipient(s) named above. It may 
contain information that is confidential and/or legally privileged. Any 
unauthorized use that may compromise that confidentiality via distribution 
or disclosure is prohibited by federal law. Please notify the sender 
immediately if you receive this communication in error and delete it from 
your computer system or destroy this document.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index