About UniGLM Macro
UniGLM macro conducts descriptive and univariable linear regression analyses of data. These analyses are essential to obtain information about distributions of explanatory variables as well as their unconditional associations with the outcome.
You may download macro (sas) and the implementation code (sas) but we strongly recommend you to read this documentation and work through the example analyses before implementing the macro for your own data.
If you are new to model building, please also read a brief introductory tutorial to model building or consult other resources before you begin.
What it can do for you
A single run of this macro produces the following formatted tables in MS Excel (it automatically creates an Excel file and saves it by the name and in the directory, you specify):
- F-test statistics and p-values based on the unconditional associations of all explanatory variables (both categorical and quantitative) with the outcome;
- Parameter estimates, their standard errors, and their confidence intervals for all explanatory variables;
- Associations between all explanatory variables (Spearman rank correlation, chi-squares, p-values or other parameters as requested); associations between all quantitative explanatory variables (Pearson correlation coefficient);
- Descriptive information about quantitative explanatory variables;
- Summary statistics of the outcome for the categories of explanatory variables.
In addition, to help in variable selection it provides two lists of the explanatory variables, one sorted by their p-value and the other by the number of missing observations.
To assist graphical appreciation of variable distributions and their associations, the macro creates four graphic files and saves them in the specified folder (accessible from within the Excel file):
- Histograms (pdf) of all quantitative explanatory variables (if any);
- Scatter plots (pdf) of all quantitative explanatory variables (if any) with the outcome;
- Bar charts (pdf) of all categorical explanatory variables (if any);
- Bar charts for the mean of the outcome (pdf) for categories of the categorical explanatory variables (if any).
You can get an idea about the sort of results produced by downloading the example output file (xls) and graphics files listed above.
Work through the module presented on the following pages to learn about implementation of this macro. The module could take from 15 minutes to 1 hour depending on your experience of using SAS and of conducting statistical analyses.