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

From |
Roger Newson <roger.newson@kcl.ac.uk> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: how to get a scalar value of the column sum? |

Date |
Thu, 15 Aug 2002 10:37:20 +0100 |

At 01:32 15/08/02 -0500, Olena Stavrunova wrote:

Use the return results from -summarize-. (See -[R] summarize- and -[P] return- in the manuals.) If you typeCould you, please, let me know how to obtain the scalar for the value of the column sum? I need the value I get using "egen sum(x)", but not the column of these values, but just a single number which stata would terat as a scalar.

summ x

scal sidney=r(sum)

then the scalar -sidney- will contain the sum of x.

I hope this helps.

Roger

--

Roger Newson

Lecturer in Medical Statistics

Department of Public Health Sciences

King's College London

5th Floor, Capital House

42 Weston Street

London SE1 3QD

United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648

Fax: 020 7848 6620 International +44 20 7848 6620

or 020 7848 6605 International +44 20 7848 6605

Email: roger.newson@kcl.ac.uk

Opinions expressed are those of the author, not the institution.

*

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

**References**:**st: how to get a scalar value of the column sum?***From:*Olena Stavrunova <ostavrun@blue.weeg.uiowa.edu>

- Prev by Date:
**st: how to get a scalar value of the column sum?** - Next by Date:
**st: Re: spaces between variables** - Previous by thread:
**st: how to get a scalar value of the column sum?** - Next by thread:
**st: Re: spaces between variables** - Index(es):

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