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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Creating a local macro


From   Maarten Buis <maartenlbuis@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Creating a local macro
Date   Tue, 11 Dec 2012 10:10:11 +0100

On Mon, Dec 10, 2012 at 11:51 PM, Mosi Ifatunji wrote:
> Per the attached file, is there a way to create some sort of local macro then obain total values for the items in the macro list.

Per the Statalist FAQ, you should not sent attachments to the list.
Sending an example dataset to statalist to clarify your question is a
good idea, but you cannot do so with an attachment. There are some
tricks shown here on how you can still sent some example data to
Statalist: <http://researchnotes.eric-a-booth.com/2010/12/example-data-for-other-stata-users.html>

> For example, how would I create a local macro called "meal1" such that it includes "dairy3 green3 grain3 fruit3 protein3"? These variables are cases in the dataset. That is, they run down the far left column. The variables for these cases are things like protein, fat etc.

Since I cannot see your example data, I really do not understand that
question. At the very least I think you mean variable when you say
local macro. See:
<http://www.stata.com/statalist/archive/2008-08/msg01258.html>

Hope this helps,
Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------

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