Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: systematically creating new observations


From   Roger Newson <roger.newson@kcl.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: systematically creating new observations
Date   Mon, 21 Jun 2004 11:55:17 +0100

At 18:59 18/06/2004, Daphna Bassok wrote:
Hello-

I am wondering if anyone can recommend a way to systematically create observations.

Suppose I have a set of observations that looks something like this:

#Points
Female415896
Male420897


What I want to do is create a new observation (not a new variable), called ALL so that the data would look something like this:

#Points
Female415896
Male420897
All8351793


Of course, I need to do this more than once. I have to do it for thousands of groups.

Is there a systematic way to add such an observation?

It seems pretty obvious but I cannot seem to figure it out.
You could do this using the -ingap- package, downloadable from SSC. In Stata, type

ssc desc ingap

to find out more, and type

ssc install ingap

to install -ingap-. Then type

help ingap

to find out more about how to use -ingap-.

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
Website: http://www.kcl-phs.org.uk/rogernewson

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/




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