BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
gzhiwei
Calcite | Level 5

Hi all,

 

I am new at SAS Enterprise Miner 14.1. 

 

I would like to do a replacement of values for a variable of the value of another value is 0.

 

E.g.

Car Ownership (Binary)

Car Value (Interval)

 

I would like to clear the Car Value value for all rows that Car Ownership = 0.

 

Thank you.

 

Regards,

Zhi Wei

1 ACCEPTED SOLUTION

Accepted Solutions
MikeStockstill
SAS Employee

Hello Zhi Wei -

 

By "clear the value", it sounds like you mean that you want to replace car values of 0 with a missing value.

 

One approach is to connect a SAS Code node to your flow, and write code to perform the replacement.  Select the Code Editor property of the SAS Code node, and try code like this (let car_value be the variable name that corresponds to 'car value'):

 

data &em_export_train;
  set &EM_IMPORT_DATA;
  if car_value=0 then car_value=.;
  run;

 

After the SAS Code node, continue your modeling flow.

 

Some customers prefer to perform re-coding in the ETL process that prepares the SAS data set before it is used in Enterprise Miner, rather than performing the re-coding in Enterprise Miner.  Use whichever approach you prefer.

 

Have a good week!

View solution in original post

1 REPLY 1
MikeStockstill
SAS Employee

Hello Zhi Wei -

 

By "clear the value", it sounds like you mean that you want to replace car values of 0 with a missing value.

 

One approach is to connect a SAS Code node to your flow, and write code to perform the replacement.  Select the Code Editor property of the SAS Code node, and try code like this (let car_value be the variable name that corresponds to 'car value'):

 

data &em_export_train;
  set &EM_IMPORT_DATA;
  if car_value=0 then car_value=.;
  run;

 

After the SAS Code node, continue your modeling flow.

 

Some customers prefer to perform re-coding in the ETL process that prepares the SAS data set before it is used in Enterprise Miner, rather than performing the re-coding in Enterprise Miner.  Use whichever approach you prefer.

 

Have a good week!

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 13841 views
  • 0 likes
  • 2 in conversation