Thank you sfleming, I used the code you've just given to me as follows:
proc sql;
create table as
select ind_qtr_qnt, lag4_roa, mean(lag4_roa) as avg_lag4_roa
from
group by ind_qtr_qnt, lag4_roa ;
quit;
But it didn't work and I got the following log message:
.
14 proc sql;
15 create table as
-
22
NOTE: The SAS System was unable to open the macro library referenced by the SASMSTORE = libref
SASUSER.
15 create table as
--------------
201
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string.
ERROR 201-322: The option is not recognized and will be ignored.
16 select ind_qtr_qnt, lag4_roa, mean(lag4_roa) as avg_lag4_roa
17 from
-
22
--------------
201
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (,
CONNECTION, DICTIONARY.
ERROR 201-322: The option is not recognized and will be ignored.
18 group by ind_qtr_qnt, lag4_roa ;
19 quit;
NOTE: The SAS System was unable to open the macro library referenced by the SASMSTORE = libref
SASUSER.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds