Personal Web Page for David A. Boulifard

Home | Background | Research | Software | Contact

 

 

 

Software

This page presents some of the software I have developed.

Quick Access Table

Excel Tools Overview

SAS Tools Overview

 

 

 

Quick Access Table

You can retrieve items collectively or individually.  All of them work independently, except for the SAS macro comma, which calls delimit.  If you download and extract the zipped SAS folder, you can run Project_Start.sas as a demo after editing two lines to specify folder paths.

 

Excel Tools

Version Date:  12/18/2010

Miscellaneous

Version_Notes.txt

change log

Database Management

Data_Dict.xls

data dictionary template

Findings Presentation

Tables.xls

statistical table composition

Plot_Reg_X.xls

regression interaction plot

SAS Tools

Version Date:  04/27/2017

Miscellaneous

Version_Notes.txt

change log

Programming Environment

Project_Start.sas

project startup program

Utility Macros

String Manipulation

replace.sas

string substitution

List Manipulation

integers.sas

number sequence generation

count.sas

item count

enumerate.sas

item display

delimit.sas

delimiter replacement (general)

comma.sas

delimiter replacement (to comma)

catenate.sas

item concatenation

set_dif.sas

set difference

set_dsm.sas

set difference (symmetric)

set_int.sas

set intersection

set_uni.sas

set union

unique.sas

duplicate removal

List Processing

loop.sas

pre-structured execution loop (one- or two-way)

Statistical Computation

desc_stat.sas

descriptive statistic (with limit on missing)

prod_term.sas

product term generation

Statistical Analysis

missing.sas

data availability/missingness patterns

tbl_reg_lin.sas

regression table (linear)

 

 

 

 

Excel Tools Overview

These items are workbooks to assist with database management and findings presentation.

Database Management

Data_Dict.xls is a data dictionary template.  A data dictionary describes the structure and content of a database.  The heart of this dictionary is a worksheet table that presents database variables in rows and lists information about them in columns.  Other sheets in the workbook help you to build and maintain this table.  If you can use Excel to search, sort, and filter information, this workbook can facilitate your management of large and complex databases, increase your speed and accuracy in programming, and enhance your perceptions of data.

data_dict.PNG

Findings Presentation

Tables.xls assists you in preparing tabular displays of statistical data.  It allows you to arrange, identify, and format statistics within a table, apart from the place where you store them.  This capability helps to bridge the gap between the output formats of analysis programs and the stylistic requirements of scientific reporting.  Once you compose a table and provide the statistics, you can print the resulting display directly from the worksheet or copy and paste it into other locations, such as word processing documents.

tables_tbl.PNG

tables_stats.PNG

tables_pmk.PNG

Plot_Reg_X.xls assists you in illustrating statistical interaction effects obtained in multiple regression analyses.  You obtain the effects by introducing predictor variables that are products of a Focal term and one or two Moderator terms.  Once you fit the model, you enter information into the worksheet table and a plot of simple effects appears in the chart.

plot_reg_tbl.PNG

plot_reg_cht.PNG

 

 

 

SAS Tools Overview

These items are programs for establishing a programming environment and installing utility macros.

Programming Environment

Project_Start.sas is a startup program template.  The program you create from it establishes the SAS environment for a project, specifying directories and libraries in a way that facilitates portability.  It also runs programs that install the macros described below.

Utility Macros

These programs install utility macros.  Many of these macros behave like macro functions, producing text you can process within macro expressions.  Others are stand-alone programs.

Each program installs one macro, using its name root as the macro's name; for example, replace.sas installs replace.  The program begins with a comment section that describes the macro and illustrates its use.  The startup program template discussed above also provides a quick reference guide in the section that runs the installation programs.  What follows is a more conceptual guide.

replace_a.PNG

replace_b.PNG

String Manipulation

These macros treat a text string as a sequence of characters without any structure.  Currently there is only one, replace, which searches a text string to replace each occurrence of one character sequence with another character sequence.

List Manipulation

These macros treat a text string as a list of items separated by delimiter characters.  Ordinarily, items are names, name-prefixes, name-suffixes, or numbers, whereas delimiters are blanks; but other schemes are possible:

%let MyVars = V01 V02 V03 V04;   * names delimited by blanks;
%let MyTabs = a*b | a*c | b*c; * crosstab requests delimited by vertical bars;

Some of these macros create, describe, or maintain lists.  For example, integers generates a list of integers; count counts the items in a list; enumerate displays the items in a list; and delimit changes the delimiter character in a list.  Others perform operations involving comparison or combination.  For example, set_dif selects the items present in one list but absent from another; and catenate joins the items in one list with those in another.

These macros can facilitate many activities involving name lists.  For example, you could generate a list of names V01 V02 ... V12, as follows:

%let MyVars = %catenate(V, %integers(12));

You could also specify a list of "drop" variables from lists of "all" and "keep" variables, as follows:

%let DropVars = %set_dif(&AllVars., &KeepVars.);

List Processing

This macro, named loop, performs a task once for each item in a delimited list, or each pairing of items from two such lists.  You specify the task in a line of SAS code, which serves as a template.  Your code refers generically to an item via the macro variable x, or to a pair of items via the macro variables x and y.  When you call loop, it runs each item or pair of items in turn through the template.  The SAS system will treat any text this processing generates as if you had coded it in place of the call to loop.

The freedom with which you can specify tasks and item lists in a variety of contexts gives loop a wide range of applications.  For example, you could generate the names V01 V02 ... V12 as above, without using catenate, as follows:

%let MyVars = %loop(%nrstr( V&x.), %integers(12));

You could also create log-transformed versions LogA, LogB, and LogC of data set variables A, B, and C within a Data step as follows:

%macro xfm;
Log&x. = log(&x.);
%mend;

data mydb2;
set  mydb1;
%loop(%nrstr(%xfm), A B C)
run;

Statistical Computation

These macros assist in preparing databases for statistical analysis by performing computations.  Both are called in the SAS Data Step.  One of them, desc_stat, applies a SAS descriptive statistics function (e.g., mean) to a list of data set variables, with a limit on the number of argument values allowed to be missing.  The other, prod_term, generates product terms from selected pairs of data set variables for use in fitting statistical interaction effects.

Statistical Analysis

These macros assist in performing statistical analyses and reporting findings.  Both are called independently.  One of them, missing, examines selected data set variables to create corresponding indicator variables that denote data availability/missingness.  These indicator variables can facilitate the analysis of patterns or the application of remedies.  The other macro, tbl_reg_lin, performs a linear regression of an outcome variable on a set of predictor variables, and stores components of the statistical output, along with other statistical information, in tabular form as a SAS data set.  You can retrieve this data set as a spreadsheet to facilitate the preparation of statistical tables and graphs (see section above on findings presentation tools):

tbl_reg_lin.PNG