I am new to using proc iml and have the following expression that doesn't seem to be working which I believe should be equivalent to 'if-then-else' statements in the data step. The variable 'teventBX' should be assigned a value (either period1/2/3/4/5) based on mutually exclusive conditional expressions.
A few records in the dataset to help understand the issue. The last column has the correct values that should have been the result of the above code. But, except for the first 2 expressions for period1 and period2, the statement above is just adding up the period values for periods 3-5. For example, in Obs3 below, teventBX = period2 + period3 + period4 + period5. And in Obs4, teventBX = period2 + period3 + period4.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.