Hello,
I am doing a simple array procedure to shape a series of wide variables into one long variable. The interesting variable is obtn1, obtn2, obtn3, obtn4, obtn5. After I run the following codes, I got a dataset with a new variable "order=6" for all observations. I have no idea where the '6' came from.
And the new variable obt is almost all " . " even when the original obtn1-obtn5 were quite well filled. Anyone knows what happened here?
Thanks!
data all_year2;
set all_year;
array obt [5] OBTN1 OBTN2 OBTN3 OBTN4 OBTN5;
do order=1 to 5;
obtain=obt [order];
end;
run;
obtn1-obtn5 are numerical variables.