As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Difference between revisions of "Tip of the Day:May 16"

From sasCommunity
Jump to: navigation, search
(Scheduled Estimate the Size of a Future SAS Data Set)
(Scheduled Quick Check for Missing or Invalid Data Using Formats)
 
Line 5: Line 5:
 
sasCommunity Tip of the Day
 
sasCommunity Tip of the Day
 
</h1><div style="padding:10px;">
 
</h1><div style="padding:10px;">
{{Tips:Estimate the Size of a Future SAS Data Set}}
+
{{Tips:Quick Check for Missing or Invalid Data Using Formats}}
 
<div style="width:100%"><hr></div>
 
<div style="width:100%"><hr></div>
Feel free to [[Tips Talk:Estimate the Size of a Future SAS Data Set|comment]] on this tip.
+
Feel free to [[Tips Talk:Quick Check for Missing or Invalid Data Using Formats|comment]] on this tip.
 
</div>
 
</div>
 
</td></tr>
 
</td></tr>

Latest revision as of 19:58, 12 May 2011

sasCommunity Tip of the Day

You can use formats to do a quick check for missing or invalid data by creating formats that map the values and then using, for example, PROC FREQ to generate a simple report. In the code at right, numeric and character formats are created to group the values and then PROC FREQ is used to provide a simple/quick QC report.
  • the special variable list _character_ is used to assign the $missing. format to all the character variables
  • the special variable list _numeric_ is used to assign the missing. format to all the numeric variables
proc format;
    value missing low-high = 'Value' other='Missing';
    value $missing ' '='Missing' other='Value';
run;
 
proc freq data=sashelp.class;
    tables _all_/missing;
    format _character_ $missing. _numeric_ missing.;
    title 'Quick QC Check';
run;
Submitted By Don Henderson



Feel free to comment on this tip.


Prior tip - Next tip - Random Tip

Submit a Tip