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: here's another thing driving me nuts


From   Scott Talkington <[email protected]>
To   [email protected]
Subject   Re: st: here's another thing driving me nuts
Date   Mon, 07 Mar 2011 23:40:37 -0500

Never mind, I think I have this figured out. The program works fine with arguments, so suspect the problem was with the choice of local variable names and entering them with the "loc" command to create macros. Arguments is an easier way to go, and more like what I wanted anyway.


On 3/7/2011 11:13 PM, Scott Talkington wrote:
Here I've defined the local variables x and y but the following line within a program generates a syntax error while the same thing from the command line does not:

table var1 if var2~=`y', c(mean `x' n `x')

in this case y is a number and x is a variable name.

I don't understand why the program line generates an error and the command line doesn't, where they're exactly the same??

*
*   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