Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: RE: macro problem


From   "Andrea Molinari" <[email protected]>
To   <[email protected]>
Subject   st: Re: RE: macro problem
Date   Thu, 22 Jul 2004 18:50:04 +0100

Thanks very much for the suggestions.
Either
local name="varlist"
regress depvar `name'
Or including the local into another program did the trick!
Andrea

----- Original Message ----- 
From: "Raymundo Perez Rico" <[email protected]>
To: <[email protected]>
Sent: Thursday, July 22, 2004 6:45 PM
Subject: st: RE: macro problem


> *This message was transferred with a trial version of CommuniGate(tm) Pro*
>
> Try :
>
> local grav="lrgdp95m lrgdp95x lrgdp95pcm lrgdp95pcx adj lingtie ldist
eumxc"
> regress lrebilm `grav'
>
> I hope this helps.
>
> Raymundo
>
>
>
> -----Mensaje original-----
> De: [email protected]
> [mailto:[email protected]]En nombre de Andrea
> Molinari
> Enviado el: Jueves, 22 de Julio de 2004 12:33 p.m.
> Para: [email protected]
> Asunto: st: macro problem
>
>
> *This message was transferred with a trial version of CommuniGate(tm) Pro*
> Dear all,
>
> I'm (also!) trying to run a very very simple macro to save me writing lots
> of regressors every time I change the specification, but it does not seem
to
> be working when I run it on my do-file.  Ideally, I'd want to define a
local
> for each specification, but for now I need to have a core model and then
add
> more variables.
>
> I'm writing:
> local grav lrgdp95m lrgdp95x lrgdp95pcm lrgdp95pcx adj lingtie ldist eumxc
>
> regress lrebilm `grav'
>
> (and also tried local grav "lrgdp95m lrgdp95x lrgdp95pcm lrgdp95pcx adj
> lingtie ldist eumxc")
>
> But the macro is not interpreted when I'm running it from the do file (it
> does work either way when I type it on the Stata Command window).
>
> I guess I should be missing something in my do file, but can't figure out
> what it may be. Any suggestions are more than welcomed!
>
> Thanks,
> Andrea
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index