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

Re: st: use of expand


From   Philip Ryan <philip.ryan@adelaide.edu.au>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: use of expand
Date   Wed, 28 Apr 2004 08:24:00 +0930

Remember also that if any of your records have n < 1 (0 is the most usual culprit) or n is missing, this record will still appear in the -expand-ed data set and you may need to drop such records to arrive at the number you expect.

Phil

At 10:28 AM 27/04/2004 +0100, you wrote:

Good morning

i have a data set with four variables, year ca age and n, where n is the number of each combination or the other three
e.g.

yeat ca age n
1995 1 13 309
1995 1 14 420
1995 2 13 363

the years can range from 1995-2002, ca from 1-6 and age from 13-19

what i would like to do is to expand the data set that i have one line for each case so for the first line above i would have 309 duplicated lines

i have try using expand but it does not give me the data set i want (i know the total n when expanded)

on another point , is stata8 case sensitive , i tried the following
tab ca - this would not work
but
tab CA would - if stata 8 is case sensitive is it possible to turn it off

regards

ann

------------
Ann Fitzmaurice
Medical Statistician
Dugald Baird Centre for Research on Women's Health
Aberdeen Maternity Hospital
University of Aberdeen
Aberdeen AB25 2ZL
Uk
a.e.fitzmaurice@abdn.ac.uk

Tel . 01224 553876

*
* 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/
Philip Ryan
Associate Professor,
Department of Public Health
Associate Dean (Information Technology)
Faculty of Health Sciences
University of Adelaide 5005
South Australia
tel 61 8 8303 3570
fax 61 8 8223 4075
http://www.public-health.adelaide.edu.au/
CRICOS Provider Number 00123M
-----------------------------------------------------------
This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyright. If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this email
by anyone other than the intended recipient(s) is strictly
prohibited. No representation is made that this email or
any attachments are free of viruses. Virus scanning is
recommended and is the responsibility of the recipient.

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