04-01-2013 07:12 PM
Hi to all,
I am new in SAS and I really would appreciate your help in how to continue with my data.
I have monthly average returns of an index for 20 years in two columns the one is the date column with the additional month and the other column is the return for the month.
So now my data is something like this:
This keeps going until 12/1945. However I care about the average return of each month (January, February,..., December) for the whole period of the 20 years. So i want to transform my data in this form.
Month Average Monthly return 1925-1945
So i want know the average return individually for each for this period. I hope I am clear in what I am asking.
Thank you in advance
04-02-2013 05:30 AM
Its numeric variable, (you are right, should specify that.)
04-02-2013 10:01 AM
This hopefully can get you started:
create table want as
select put(input(put(dates,8.),yymmdd8.),monname3.) as month, mean(return) as Average_1925_1945 from have
group by month