[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: Re: st: RE: RE: tabstat: how to save...
Thank you Michael for your thoughts.
My approach to applying Stata to my problem is to start using a simple example and a small sample, using what I know of Stata accumulated over time (doing Stata, reading Statalist, manuals) e.g. co-apting lines from here and there to generate my -do- or -ado- to do what I needed to do. This may lead to an unefficient -do- or -ado- codes at times (perhaps all the time) but so long as they worked I would be none the wiser to the fact.
My query regarding -tabstat- approach led Nick to advice me on a better solution. When I used part of what Nick had suggested and got it to work for my purpose, I am quite satisfied with the outcome. Certainly none of my follow-up contained or can be construed as a complaint (or even remotely meant as a complaint) that this and that instructions did not work. If anything Nick's advice provided me with a solution.
In the example of -tabstat-, following earlier instructions to the letter led to a differing conclusions that was highlighted by Kit Baum being attributed to version differences. When I co-apted Nick's alternative suggestions (i.e. -tempname- and -scalar-), tweaking them to work, I assumed that the ` ' issue was a version issue too. I replied out of simple courtesy to acknowledge Nick's help and that everything's 'cool'. I appreciated it even more that Nick warned of the potential pitfalls doing what I have done, pitfalls which I was not aware of. I could leave it at that but that would mean missing an opportunity to learn more about Stata by trying to undertand the pitfalls. So my follow-up contained lines that led me to assume ` ' was a version issue and looking at my follow-ups I did not see any complaint or word to that effect regarding suggestions that did not work. I was therefore quite taken aback by your take of the situation. Perhaps if one can see it as you do, othe
rs may or will too, so I will bear that in mind.
> Date: Wed, 10 May 2006 09:09:54 -0400
> From: email@example.com
> Subject: Re: st: RE: RE: tabstat: how to save...
> To: firstname.lastname@example.org
> 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
> ----- Original Message -----
> From: "b. water" <email@example.com>
> To: <firstname.lastname@example.org>
> 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/
Join the next generation of Hotmail and you could win the adventure of a lifetime
* For searches and help try: