SAS Macros

These are components that can be used within your own SAS programs. Headings at the top of each file describe how to call or use them, and examples are provided. See below for guidelines on calling these from within your programs.

(For more biostatistical SAS tools see sasCommunity.org.)

Calling macros

To use one of these macros in your program, or within another macro you create to post here, put statements like the following before you call the macro:

/* filename lreg URL "http://CTSpedia.org/do/viewfile/CTSpedia/LogisticRegressionMacro?filename=Logistic.sas;rev=4"; */
filename lreg URL "http://ctspedia.org/twiki/pub/CTSpedia/LogisticRegressionMacro/Logistic.sas";
%include lreg;

These statments make the main logistic regression macro available. The fileref "lreg" in the above is just a word that you can make up, but it should be no more than 8 characters long. (Note that you should be able to copy and paste, rather than type in, the URLs: Here's how).

It will usually be best to use this form, which uses the most current version of the file even if it changes since you first wrote your program. This will incorporate any subsequent error or problem corrections. The commented out statement above it instead finds the specific version of the macro that was current when you wrote your program. You may need this if a later updated version is not called the same way or does not produce the same output as assumed in your program. Switching which statement is commented out will then permit your program to run as originally intended without updating it to work with the later version of the macro it calls.

Possible Enhancements

Investigate use of the SvnPlugIn to track versions of tools.
Develop a convention for noting errors found and corrected in earlier versions, so that users of the tools know that they should update any old programs to use the newer versions.

Need Checklist for Corr Macro :completed Barbara/Peter July 2009

Topic attachments
I Attachment Action Size Date Who Comment
elsesas Logistic.sas manage 32.0 K 18 Aug 2009 - 12:38 ChengshiJin  
Topic revision: r46 - 17 Mar 2010 - 16:58:44 - RuiChen
 
Copyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CTSPedia? Send feedback