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   "b. water" <barleywater@hotmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: RE: tabstat: how to save...
Date   Wed, 10 May 2006 10:48:13 +0000

Thank you Nick for your alternative suggestion. 

In Stata 8.2, scalar `foosum' = r(sum) is an invalid syntax but checking on-line help showed valid syntax as scalar foosum = r(sum). This suggestion worked for my purpose and as you alluded, shorter than tabstat.

Regards,
bw

----------------------------------------
> Subject: st: RE: RE: tabstat: how to save...
> Date: Tue, 9 May 2006 21:34:20 +0100
> From: n.j.cox@durham.ac.uk
> To: statalist@hsphsun2.harvard.edu
> 
> Or, to put it less gnomically, Stata did change this 
> detail from Stata 8.2 to Stata 9. B. Water did declare
> use of 8.2. I used 9.2 without checking back that 8.2
> was similar. 
> 
> Nick 
> n.j.cox@durham.ac.uk 
> 
> Nick Cox
>  
> > As Kit points out, B. Water's failure to reproduce
> > what I typed accounts for their failure to 
> > reproduce what I posted. 
> > 
> > In addition to this diversion, note that if the problem 
> > is picking up a sum for future use, then -tabstat- is 
> > a long way round. 
> > 
> > tempname foosum 
> > su foo, meanonly 
> > scalar `foosum' = r(sum) 
> > 
> > is more direct, with no hidden interpreted code, 
> > as in -tabstat-. 
> 
> > Kit Baum
> >  
> > > B.Water said
> > > 
> > > matrices:
> > >             r(StatTot) :  1 x 2
> > > 
> > > . mat total = r(StatTotal)
> > > 
> > > Well, if the matrix in Stata 8.2 is named r(StatTot), then 
> > referring  
> > > to r(StatTotal) doesn't make much sense...
> > > In Stata 9, tabstat returns r(StatTotal), which is probably 
> > why Nick  
> > > referred to that name.
> > 
> > *
> > *   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/

_________________________________________________________________
Enter the Windows Live Mail beta sweepstakes
http://www.imagine-msn.com/minisites/sweepstakes/mail/register.aspx
*
*   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