You might like to try the -expgen- command, which is an extended version
of -expand- downloadable from SSC, which sorts the dataset so that the
duplicates of each observation are side by side, and can optionally add
a new variable giving the sequence number of each duplicate within the
set of duplicates for the same observation. In Stata, use the -ssc-
command to download -expgen-.
I hope this helps.
Roger
Roger Newson
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of SamL
Sent: 26 April 2006 15:43
To: [email protected]
Cc: [email protected]
Subject: Re: st: duplicating observations
As some have said, you can use the -expand- command. If you only need
to
expand so you can estimate models, many models allow frequency weights,
which basically do the expansion on-the-fly during estimation.
Hope this helps.
Sam
On Wed, 26 Apr 2006, louis boakye-yiadom wrote:
> Dear All,
> Is there a Stata command for duplicating observations? I have a
summarised
> dataset, in the sense that it is in a "frequency table" format, but
I'm
> interested in converting it into individual level observations. So I
reckon
> if there is a way of asking Stata to generate multiple copies of an
> observation, I would be able to have the data in the desired format.
Any
> help will be appreciated. Thanks.
>
> Louis
>