BookmarkSubscribeRSS Feed
sanyam13
Fluorite | Level 6

How can I detect and treat missing values for qualitative variables ? For quantitative data, I can detect with N and Nmiss and replace them 0 or Mean. Do we have some procedure for qualitative variables as well ?

1 REPLY 1
Astounding
PROC Star

Detecting:

 

proc format;
   value $missfmt  ' ' = 'missing' other='present';
run;
proc freq data=have;
   tables varname / missing;
   format varname $missfmt.;
run;


Fixing is up to you. There is no standard method. It depends on what you intend to do with the data. The most common option is to do nothing. Why would a missing qualitative value need to be replaced? At any rate, this is a valid DATA step statement:

 

if varname = ' ' then varname = 'N/A';

Whether you're already using SAS Event Stream Processing or thinking about it, this is where you can connect with your peers, ask questions and find resources.

 

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 629 views
  • 1 like
  • 2 in conversation