From | Roger Newson <[email protected]> |
To | [email protected] |
Subject | Re: st: use of expand |
Date | Tue, 27 Apr 2004 11:23:55 +0100 |
At 10:28 27/04/04 +0100, Ann Fitzmaurice wrote:
Good morningAs Nick Cox says, Ann doesn't specify exactly what is going wrong. However, I realise that -expand- can be confusing in that it puts the new observations at the end of the dataset, when the user usually wanted them to be next to the observations from which they were copied. Ann might like to try the -expgen- package, downloadable from SSC, which is a more user-friendly version of -expand-. In Stata, type
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)
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |