[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: FW: How to make 'contract' create a row of zero frequencies?
I have a large dataset containing information on individuals attending for
screening at several centres.
I am writing a program to summarise monthly attendance, to be run regularly
by one of our administrators. So I first 'contract' my data to create a new
dataset of the number of attendances for each centre for each month. I used
the following statement:
contract centre3 mrec, freq(count) zero
(Centre3 = centre code, mrec = month code)
I have discovered that when there are no attendances in a month at any of
the centres, Stata completely excludes this month rather than create a zero
count for each centre.
This then completely throws out my summary statistics. Is there any way I
can force 'contract' to create a count of zero for each centre for any month
with zero attendance at all centres?
Pauline A Rogers MSc CStat (Mrs)
Cancer Research UK
Colorectal Cancer Unit
St Mark's Hospital
Tel: 020 8235 4256
Fax: 020 8235 4277
* For searches and help try: