We have seen how to utilize some powerful procedures for statistical analysis. As a data user, the transformation of data from horizontal to vertical or regrouping between columns and rows is an important tactical step. This step could be necessary for forming the input to the modeling dataset or as an output to produce a report or showcase insights. You may want to transpose all the variables or just some of them. This is also an effective way to present variables in a grouped manner, without having to perform any mathematical aggregation.
We will use the variables from the following dataset to learn about transposing:
Data Base;
Input CustID Year Avg_Credit Avg_Debit Spend_Indicator $;
Datalines;
1010 16 235 245 R
1010 17 230 220 A
1010 18 235 200 G
1010 19 254 220 G
1011 16 653 650 A
1011 17 650 610 G
1011 18 640 620 G
1011 19 650 656 A
1012 16 569 569 R
1012 17 560 550...