| Macro Name |
RegMacro |
| Description |
This is a macro for performing linear regression with a numeric outcome, checking model assumptions, and producing output that is arranged in a way suitable for use in publications. Some features that add convenience include checking model assumptions, finding the observation with the largest Cook's distance and leverage, and showing basic statistics for predictors. NOTE: There will be a RTF output file generated to save to user's local disk. Please specify the directory under which the output file is saved when calling %RegMacro. |
| Macro Parameters |
DSName: Name of SAS data set. Dir: Directory where the output file is saved. Using '\' for Windows and '/' for Linux. ID: Name of the variable for object ID. Outcome: Name of outcome variable. PredictNum: Name of the continuous covariates. PredictClass: Name of the categorical covariates. ClassRef : Reference value used to create the dummy variable for the corresponding PredictClass variable. If no reference is specified, a dot (.) must be input as a place holder and the highest value of the variable will be served as reference level. Format: Formats of the variables with with the same order in PredictClass. if no format defined for the corresponding qualitattive variable, a dot (.) must be input as a place holder. Diagnostic: Linear, ResidQuantile or N (default=N) -N: No diagnostic procedure is performed. -Linear: Creating and testing quadratic terms. -ResidQuantile: No plot but calculate the average squared studentized residual within each 10-percentile. Plot: Multiple, Residual, QQ, or N (default=N) -N: No plot will be generated. -Residual: Plot of residual vs. predicted value. -QQ: Q-Q plot. -Multiple: multiple plots. Outdata: Name of output SAS data set containing reg estimates, p-values, leverages, Cook's distances etc. Outfile: Name of output file Demographics: Y/N (default = N) -Y: Frequencies and percentages are displayed with qualitative variable values means and standard deviations are displayed with quantitative variable values. |
| Programmer | Rui Chen |
| Revision | July 15, 2010 (updated) |
| Disclaimer | This SAS macro is developed by Rui Chen and other members in the Department of Biostatistics and Computational Biology at the University of Rochester under the auspice of the CTSI BREAD with the intent to facilitate data analyses and reporting in clinical and related research. It is copyrighted by Dr. Chen, October, 2008 and distributed for free public access. |
| Example(s) |
SampleLinearRun.sas: Example using the Linear macro LinearRtfExample.rtf: The output file produced by the example program |
| Special Features | N/A |
| Called Macros |
%words %CheckVar %RefDummy %residsqr |
| Notes | |
| See Also |
%Logistic %Countreg |