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

How to use replacement node to replace null with zero?

cannot google it, only find replace zero with missing

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
BrettWujek
SAS Employee

Ken - Another option for you may be to use the Impute node to replace all missing values throughout the data set with 0.  This node does not offer the same level of control over the replacement criteria on a per variable basis as the Replacement node does, but it does provide other possibly more meaningful options for the replacement value (other than a default constant like 0).  If you haven't already, you may want to consider imputing missing values with the Impute node.  It all depends on how you intend to analyze the data.

To use the Impute node to simply replace all missing values (for all variables) with 0, set the "Default Input Method" (or Default Target Method) to "Default Constant Value" and set the desired value in the entry provided below that.

Good luck with your analysis.

Brett


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

View solution in original post

4 REPLIES 4
OS2Rules
Obsidian | Level 7

I think you are looking for OPTION MISSING=0;

BrettWujek
SAS Employee

Ken - Another option for you may be to use the Impute node to replace all missing values throughout the data set with 0.  This node does not offer the same level of control over the replacement criteria on a per variable basis as the Replacement node does, but it does provide other possibly more meaningful options for the replacement value (other than a default constant like 0).  If you haven't already, you may want to consider imputing missing values with the Impute node.  It all depends on how you intend to analyze the data.

To use the Impute node to simply replace all missing values (for all variables) with 0, set the "Default Input Method" (or Default Target Method) to "Default Constant Value" and set the desired value in the entry provided below that.

Good luck with your analysis.

Brett


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

jakarman
Barite | Level 11

NuLL is not equal to missing. The concepts in a RDBMS and statistical environment are different. What are you doing?

---->-- ja karman --<-----
ken88
Calcite | Level 5

Thank for letting me know, basically I have null in the field revenue from client, and it is null because it cannot find any revenue, so they can be replace with 0.

I then will do a cluster analysis

Thank You

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 4 replies
  • 3982 views
  • 0 likes
  • 4 in conversation