I am attempting to create a loop that will capture my data at various window sizes for further evaluation. The problem, at the moment, is that the 'where' statement is only evaluating my first condition, and not the second.
Here's the code:
%let min_year = 1995
%let max_year = 2005
%macro loop;
%local window; %let window = 1;
%do i = &min_year. % to &max_year. %by 1;
data small_data_roll_wind;
set my_large_data (where = (%eval(&i. - 1) > year1 < (%eval(&i. + 2))));
run;
%let window = %eval(&window. + 1);
%end;
%mend loop;
%loop
For the most part this works, except that only "(where = (%eval(&i. - 1) > year1" is evaluated. The second component "year1 < (%eval(&i. + 2))));" seems to be completely ignored from what I can tell. I assume I am missing some syntax here, but any insight is appreciated.