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: using macro


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: using macro
Date   Mon, 30 Apr 2012 21:09:11 +0100

Using a local macro should make no difference. Something else that you
are doing makes a difference.

Check by displaying the macro just before you use it.

di "`controls'"
regress y x `controls', ro

Nick

On Mon, Apr 30, 2012 at 9:00 PM, urbain thierry YOGO <yogout@gmail.com> wrote:

> I am a bit confuse about what come out while using a macro with
> regress. For instance i want to run the following model:
> regress y x a b c d, ro (1)
> and i use macro
> local controls a b c d
> after
> regress y x `controls', ro (2)
>
> the point is that i don't understand why the coefficient of x differs
> accross equations. Please can somebody explain me? thanks in advance
*
*   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