SmryEachVar A Data Review Suite

From sasCommunity

Jump to: navigation, search

Contents

[edit] SmryEachVar: A Data Review Suite For Each Variable in All Data Sets in a Libref

http://www2.sas.com/proceedings/forum2008/003-2008.pdf


previously:

[edit] Summarize Memnames in Libname

Author: Ronald J. Fehd

Abstract: This paper providess a set of parameterized include module, routines and subroutines which provide a summary of each data set (Memname) in a library (Libname).

Description:

  1. call execute routine ProcFreq (previously FreqAll), on all variables in each data set in a library.
  2. for numerics add: ProcMode and ProcSmry

Purpose: data review

Audience: data managers, intermediate to advanced users and macro programmers

Keywords: call execute, data review, dynamic programming, includes, list processing, nrstr, routines, source2, subroutines%, sysparm


Introduction:

Users responded favorably to Fehd's fall 2006 paper: FreqAll which provides a concise summary data set of one data set: one Memname.

And, of course, everyone wants to run this data review routine on every member in their library! ... or just one!

[edit] Updates of 2008-May

Based on feedback and commentary from our user community since I published this suite in the fall RUGs and at SGF-2008 I have added the following features:

  • added parameter: DotSAS, default: blank, set to .sas for Unix usage
  • added parameter: Memname, default: _all_

users can now choose just one data set to review

  • added parameter, ExportFreq2csv, when true, 1, writes

proc freq output data set to .csv when CardRatio lt .5

  • removed variable Unique and replaced with:
  • added variables: CardRatio and CardNote which provide information of Cardinality Ratio, which is calculated as NobsFreq / NobsData.

see: http://www.sascommunity.org/wiki/Cardinality_Ratio

  • provided format value CardRatio; proc format is automagically submitted

by autoexec if not cexist(Library.Formats.CardRatio.format)

  • report of duplicate names is executed only when Memname ne _all_
  • consolidated 5 CallX* programs into CallXany; this reduces the level of %includes
  • new program CallXany which transforms _character_ variables into macro variables

and calls the named parameterized %include program

  • Download the SmryEachVar zip file for Version 2 which has a module to calculate Cardinality Ratios

http://www.sascommunity.org/wiki/Cardinality_Ratio .


[edit] References

  • sgf2007.028

Journeymen’s Tools: Data Review Macro FreqAll: Using Proc SQL List Processing with Dictionary.Columns to Eliminate Macro Do Loops

http://www2.sas.com/proceedings/forum2007/028-2007.pdf Coder's Corner, 9 pp.

  • SAS-L post with fix to FreqAll

Subject: Re: tip: macro FreqAllVars

http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0701A&L=sas-l&P=R14003

TinyUrl: http://tinyurl.com/5682j8

--macro maven == the radical programmer 17:09, 7 March 2008 (EST)

  • Page modified 14:26:58, 2008-Apr-28.
    • This page has been accessed 1,755 times.
  • This page was last modified 20:49:10, 2008-May-23.
    • This page has been accessed 1,979 times as of 2008-May-30
  • This page was last modified 21:28:55, 2008-May-30.
    • This page has been accessed 2,337 times as of 2008-Jun-05
  • This page was last modified 14:52:49, 2008-06-05.
    • This page has been accessed 2,899 times as of 2008-Jun-13
  • This page was last modified 16:52:49, 2008-06-13.
    • This page has been accessed 4,544 times as of 2008-Oct-01
Personal tools