Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Creating a loop for placing observations in a macro without vallist


From   Miles Grogger <[email protected]>
To   [email protected]
Subject   st: Creating a loop for placing observations in a macro without vallist
Date   Wed, 7 Aug 2013 09:16:28 -0500

Hi Statalisters,

I currently have a program that is allowing me to import an excel
file, reshape it, and then place observations in a macro by using the
command:

local macname "`=varname[1]' `varname[2]'...etc."

This works fine for a few observations, however I eventually want to
be able to place 544 observations in the macro. Is there a loop I
could use in order to make all of this more automatic?

Thanks,
Miles
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index