Hi!
I have created a dummy variable as my target variable where 0 indicates that the event "payment handled" has not occured, and 1 that is have occured. Furthermore, i want to add a value "2" in my target variable indicating that the event "payment handled" has not occured due to another event called "decleration rejected". This means that the event has to have a value <0 at decleration rejected, and 0 at payment handled. Both events are extracted from the same column named, activity_id.
Can someone help?
It has to have a value >0 at decleration rejected**
If I understand you correctly than add a line:
sum(activity_id="decleration rejected") as rejected /* new dummy */
then add a new step:
data tuetravelexpenses_cases;
set tuetravelexpenses_cases;
if rejected > 0 then target_variable=2;
*drop rejected;
run;
Almost!
The value "2" requires that "payment handled" is 0, and "declaration rejected" > 0, and not only that "declaration rejected" > 0.
But i managed that by adding "and". Thanks for the help!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.