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]

Re: st: Command accepts only global macros


From   Joerg Luedicke <[email protected]>
To   [email protected]
Subject   Re: st: Command accepts only global macros
Date   Wed, 30 May 2012 09:37:27 -0700

You neither say where -mvdcmp- is from and what version you use, nor
do you show what exactly went wrong (e.g., by showing what exactly you
did).

Assuming -mvdcmp- from SJ, version 10 from 2010/09/17 (run in Stata
11.2), there does not seem to be a problem with -mvdcmp- picking up
the contents of a local macro:

*------------------------------------
sysuse auto, clear

mvdcmp foreign: reg price mpg

loc vlist="price mpg"
mvdcmp foreign: reg `vlist'
*------------------------------------

J.


On Wed, May 30, 2012 at 8:03 AM, Kohvakka Roosa <[email protected]> wrote:
> Hi,
>
> Does anyone have any idea why some commands accept only global, and not local, macros in them? E.g. with  "regress" you can use local macros for the depvar and indep vars, no prob. But with this user-written command "mvdcmp" I am using (a decomposition) I can only define the dependent variable, indep variables and the estimation command using global macros.
>
> I can do this all right, just wondering why this is. Thanks.
>
> Roosa Kohvakka
> Researcher
>
> *
> *   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/

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