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 <>
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:

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:


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:


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

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

* For searches and help try:

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