>
********
input id sex disability education str5 school
1 1 0 12 "A"
2 0 1 8 "B"
end
expand 5 if school=="A"
**or just "expand 5" if you want all the observations repeated 5 times**
********
~ Eric
__
Eric A. Booth
Public Policy Research Institute
Texas A&M University
[email protected]
Office: +979.845.6754
On Feb 15, 2010, at 7:50 AM, Shehzad Ali wrote:
> Hi listers,
>
> Is it possible to create multiple rows for each observation and copy the data for each id in the new rows?
>
> My data currently looks like this:
>
> id sex disability education school
> 1 1 0 12 A
> 2 0 1 8 B
>
> I want to make the data look like this:
>
> id sex disability education school
> 1 1 0 12 A
> 1 1 0 12 A
> 1 1 0 12 A
> 1 1 0 12 A
> 1 1 0 12 A
> 2 0 1 8 B
>
>
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/