Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: RE: tabstat: how to save...


From   "Michael Blasnik" <michael.blasnik@verizon.net>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: RE: RE: tabstat: how to save...
Date   Wed, 10 May 2006 09:09:54 -0400

You have a remarkable ability to not follow the sound advice you receive and then complain about things not working. If you would just actually use the exact code that is posted, you would have far fewer problems.

-tempname- and -local- are two different commands that do different hings. -tempname- will create a local macro that can then be used to name objects like scalars. Please read -help tempname- .

Your line of code -local incidnsum- does nothing -- it assigns nothing to the local macro called incidnsum.

Please follow the advice you get from Statalist EXACTLY before you send in more follow-up posts about things not working.

Michael Blasnik
michael.blasnik@verizon.net

----- Original Message ----- From: "b. water" <barleywater@hotmail.com>
To: <statalist@hsphsun2.harvard.edu>
Sent: Wednesday, May 10, 2006 8:41 AM
Subject: RE: st: RE: RE: tabstat: how to save...



The reason I said what I said is when I did:

. do "C:\DOCUME~1\waterb\LOCALS~1\Temp\STD02000000.tmp"

. local incidnsum

. sum incidn, meanonly

. scalar `incidnsum' = r(sum)
= invalid name
r(198);

end of do-file
r(198);

. help scalar

revealled some example on how to use scalar, where none was put in Stata quotes ` '. This led me to surmise that it is probably version issue of scalar syntaxes. But on closer look I realised that perhaps you are referring to may lax ( due to ignorance) use of -local- rather -tempname- in my -do- file, and consequently having to use -scalar- without `'. Is this what you meant by your warning? Although I think your warning refers to [P] Macro, I would appreciate if you can direct me to the pertinent reference in the manuals if this is assumption was not correct. Nevertheless, I have used your exact example using -tempname- and -scalar `foosum'-.

Regards,
bw
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index