|
data like;
set have
have;
by id;
run;
But why??
On Thu, 29 Jun 2006 13:19:45 -0400, joanne <hsiehchu@MSU.EDU> wrote:
>Hello:
> a simple question about data arrangement. but, not knowing how
> to begin with. will appreciate for your any advice or input.
>
> i have a dataset look like the following,
>
> Obs ID X1 TIME X2 X3 X4
> 1 02 54 0 2 -0.67 -1.04
> 2 02 57 1 2 -0.27 -0.61
> 3 02 55 2 2 -0.57 -0.18
> 4 15 59 0 2 -0.17 -1.04
> 5 15 60 1 2 -0.10 0.07
> 6 15 61 2 2 -0.39 -0.81
> 7 16 56 0 1 0.11 0.87
> 8 16 55 1 1 -0.44 -0.37
> 9 16 55 2 1 0.06 -0.44
> ......
> if i'd like to extend the original data, and makes each ID regenerate its
>corresponding variables (like, X1, Time, X2, X3...) twice in each column,
>
> Obs ID X1 TIME X2 X3 X4
> 1 02 54 0 2 -0.67 -1.04
> 2 02 57 1 2 -0.27 -0.61
> 3 02 55 2 2 -0.57 -0.18
> 4 02 54 0 2 -0.67 -1.04
> 5 02 57 1 2 -0.27 -0.61
> 6 02 55 2 2 -0.57 -0.18
> 7 15 59 0 2 -0.17 -1.04
> 8 15 60 1 2 -0.10 0.07
> 9 15 61 2 2 -0.39 -0.81
> 10 15 59 0 2 -0.17 -1.04
> 11 15 60 1 2 -0.10 0.07
> 12 15 61 2 2 -0.39 -0.81
> ......
>what should i do to make it? thanks in advance for your time & help.
|