Could someone help me out with this rolling regression issue? I've tried to modify the code found from sascommunity.org/wiki but unsuccesfully. Here's what I've wrote, I know it's not correct but at least a starting point..I have the data readily sorted by date (dataset tt). I hope someone would be able to modify the code to a more sensible diection. Thanks!! %let nmonths=60; data expanded(drop = nn); length span $ 13; set tt; do nn = 1 to &nmonths; span = catx( '-' , put(intnx('month',199007,nn-&nmonths),yymm6.) , put(intnx('month',200812,nn-1 ),yymm6.) ); output; end; run; *Re-order. ; proc sort data=expanded; by span date; run; *Finally, run all of the regressions independently in a single step; . proc reg data=expanded noprint outest=regout; by span; model Identity = meanHML meanMOM; run;
... View more