02-18-2015 12:47 AM
I have data for credit card customers with their month on month balances ( In columns ) for last 24 month .
This makes my data with 25 column ( 1 card nbr + 24 for balances ).
I want to compute std dev of coumn 1-12 and 13-24 respectively .
Also i want to recompute std dev for columns 1-12 and 13-24 by excluding MAX from each set .
How can i do this ?
02-18-2015 02:30 AM
For the first part of your question:
proc transpose data=have out=long;
format h $ 5.;
if first.nbr then do;
else if c >= 13 then h="13-24";
proc means data=wide std ;
class nbr h;
var col1 ;
02-18-2015 04:30 AM
Yes, as mentioned above you want to normalise your data. This is a method of taking columns and creating records from them. The opposite is transposed where records are taken and columns created (which you currently have). Once you have your normalised table you can do the means as above, then with an extra 2 steps:
proc sort data=xyz;
by nbr descending col1;
if first.nbr then delete;