1

Hi,

I want to do a rolling window autocorrelation with by ID groups. For each ID group, I want to calculate the autocorrelation using 36 months of observations. Is there any easy way to do this?

I checked PROC EXPAND, but it seems to have no such function.

Thank you very much.

flag

2 Answers

1

You can calculate the sample autocorrelations (acf) using the proc arima identify statement like shown[http://support.sas.com/onlinedoc/913/getDoc/en/etsug.hlp/arima_index.htm][1]

proc arima data=sashelp.air;
identify var=air nlag=36 outcov=correlations;
run;quit;

You can accomplish the group processing using the a by statement on your variable that identifies the groups.

Could you explain why you want a rolling window acf?

Sam

link|flag
0

Could you provide us a sample of your input dataset ?

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.