*********************** *** VCD Archive *** *********************** This archive contains the programs and data sets from ``Visualizing Categorical Data'' (VCD). These programs are maintained by me at the VCD web site, http://datavis.ca/sas/vcd/ My complete collection of SAS macros, including those from VCD is also available at http://datavis.ca/sasmac/ where any updated versions may be found. This includes a few additional macros that were not included in the book, but are now included in here. All of these are publicly available individually, but the convenience of a complete collection, installation instructions and the possibility of support from me are intended as a service limited to purchasers of VCD. ARCHIVE STRUCTURE The files are grouped into the following directories, under a general directory, Vcd catdata- data sets from Appendix B doc - some documentation, in pdf form iml - all the SAS/IML programs macros - all the macro programs (Appendix A), plus some others mosaics- SAS/IML programs for mosaic displays, and examples v8 compiled IML mosaics modules for SAS V8, Windows v9 compiled IML mosaics modules for SAS V9, Windows v8-unix compiled IML mosaics modules for SAS V8, unix v9-unix compiled IML mosaics modules for SAS V9, unix sample - selected sample programs INSTALLATION 1. For ease of use, you should extract these directories to similarly-named directories under your !SASUSER directory. Actually, almost anywhere will do, as long as you unzip the archive preserving the directory structure, including the top-level directory, Vcd. In a Windows environment, you might unzip to c:\sasuser, giving the collection of files under C:\SASUSER\Vcd; In a Unix-like system, you might unzip to ~/sasuser/, where '~' refers to your home directory. 2. I include a file, Vcd/autoexec-vcd.sas, that can be used to complete the installation. You should open that file in a standard text editor, read the initial comments, and make whaterver changes are required for your system. The main one is specifying the location where you installed Vcd as the value of the macro variable 'sasvcd'. Some possibilities are: %let sasvcd = c:\sasuser\Vcd; *-- Windows, local drive ; %let sasvcd = c:\Documents and Settings\myuser\My Documents; %let sasvcd = \\OGSLAB\sas\Vcd; *-- networked drive; %let sasvcd = ~/sasuser/Vcd; *-- unix ; 3. Finally, you need to make it so that SAS will read and execute this file whenever it starts. There are several ways to do this, depending on your operating environment. More details are given in the initial comment block in Vcd/autoexec-vcd.sas. (a) The simplest way, for an invididual user is to copy the file, autoexec-vcd.sas, to autoexec.sas in one of the standard locations where SAS searches for this file on start-up. (b) For a Windows (network) installation, you can also append the following to the Target string under Properties of the SAS icon. -autoexec "drive:\path\to\autoexec-vcd.sas" If you already have an autoexec.sas file installed, you can either: (a) Copy the lines from my autoexec-vcd.sas into it. (b) Insert the following line in your existing autoexec.sas (modifying the 'path/to' part appropriately). %include 'path/to/autoexec-vcd.sas'; Installation Details The following details are unnecessary if you followed the steps above and they worked for you. They are included only for those who need more detail, or want to spend more time reading this README rather than getting on to work! The macro programs are most easily used if you add the name of the macros directory to the list of directories recognized by the SAS Autocall Facility. Then, SAS will search this directory automatically for macro programs which you invoke. You can do this by adding a statement like the following to your AUTOEXEC.SAS file: options sasautos=('vcdmacros', SASAUTOS); substituting for 'vcdmacros' the directory to which you copied the macros; for example under Windows, options sasautos=('c:\sasuser\Vcd\macros', SASAUTOS); It is also convenient to define (in your AUTOEXEC.SAS file) FILENAME statements to point to these directories, for use in %INCLUDE statements, so that you do not need to refer to full path filenames. The following FILEREFs are assumed to be defined in most of the sample programs. They are illustrated here using pathnames for a Unix system. filename iml '~/sasuser/Vcd/iml'; filename macros '~/sasuser/Vcd/macros'; filename mosaics '~/sasuser/Vcd/mosaics'; filename catdata '~/sasuser/Vcd/catdata'; Thus, the statement, %include catdata(icu); will find the file ~/sasuser/Vcd/catdata/icu.sas. In addition, all of my graphics application programs (in the samples/ and mosaics/ directories) use a single file, goptions.sas, to set global graphics options the way I want, and to make these applications portable. I define this file in a FILENAME statement as, filename goptions '~/sasuser/Vcd/goptions.sas'; and start each program with %include goptions; In the VCD archive, this file is empty, so nothing is actually done. For Windows systems, this file might contain, for example, goptions reset=all device=win target=winprtc; or might simply remain an empty file. On a Unix system, for direct output to PostScript files, I use something like, goptions lfactor=3 device=pscolor ftext=hwpsl009 htext=1.5 htitle=2; Instructions for installing the SAS/IML programs for mosaic displays are given in the INSTALL file in the mosaics/ directory, but there should be nothing to do if the standard installation worked for you. REQUIREMENTS: All of the programs require Base/SAS, SAS/STAT and SAS/GRAPH. Many also require SAS/IML. LIMITATIONS: The macro and SAS/IML programs published in VCD do some rudimentary error checking (mostly for required parameters), but largely depend on the user having read the program documentation, and understanding how they should be used. All of the macros and other programs were originally developed and tested under SAS Versions 6.07 - 6.12. Since then, most have been tested and modified as required under V8 - V9. In addition, all SAS graphics depend on the graphics parameters for fonts, graph size, etc. set in the graphics device driver and in goptions statements. In particular, the HPOS and VPOS settings for your graphics device may make the output graphics look quite different from those published in VCD. I do all my work with the PSCOLOR driver, for which my settings are goptions hpos=80 vpos=75;