I need to create a variable for week0-week187 and doing that RBAR is just that. data looks like:
ID WEEK
1 0
1 28
1 186
2 187
2 30
I am trying to make week0-week187 variables that will be 1 or 0 if the observation is in a given week, should look something like this
ID WEEK WEEK0 WEEK1 ...WEEK28 ... WEEK30...WEEK186 WEEK187
1 0 1 0 ...0...0...0 0
1 28 0 0 ... 1 ... 0 ... 0 0
1 186 0 0 ... 0 ... 0 ... 1 0
2 187 0 0 ... 0 ... 0 ... 0 1
2 30 0 0 ... 0 ... 1 ... 0 0
maybe a DO statement is necessary? most of the time proc sql is causing SAS to crash because my computer is a junkpiece. SAS code is preferred