Hi all, I am trying to create indicator variables, based on information in other variables in my table. I have a data set in wide format (which I created from long) that has subject data at many (up to 700) different timepoints. Basically, if ANY of those time points have a specific value, I'd like to create an indicator. For example, if any of T1-T100 = 1, then I want INDICATOR=1. Can I have SAS specify a range of variable to check in my IF statement? I know I can us multiple "or" statements, but this is not practical, given the large number of time points. Also, I considered writing it into my array when I converted from long to wide format, but this did not seem to work and I did not see documentation on this particular issue. This is what I tried.. data wide (keep=id T1-T&mm var1-var&mm); array T(&mm); array var(&mm); do j = 1 by 1 until (last.id); set data1; by id; T(j) = Time; var(j) = score; if var(j) = 20 then HIGH = 1; else HIGH=0; end; Thanks for your help! -Katie
... View more