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

Re: st: Problems with program

From   n j cox <>
Subject   Re: st: Problems with program
Date   Thu, 18 Aug 2005 17:17:16 +0100

If I understand this correctly, this has nothing to do with -outreg-, -estout- or any other program downstream. The problems are within your own code.

You refer to `var' within your program -regse- without ever defining it previously in the same program. This is not illegal but Stata will interpret the reference to a non-existent macro as an empty string and the result will presumably not be what you want.

That is, `var' within program -regse- is a local macro
name. The fact that the -foreach- loop outside your
program also uses a local macro name `var' has no implications
within your program. The two are in completely different
name spaces. That is precisely what the "local" of "local
macro" means.

One possibility is to pass `var' to -regse- in an option.


* For searches and help try:

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