Online Program

A SAS macro to calculate sample size for evaluating mediation effect: the linear model case
*Rajendra Prasad Kadel,  

Keywords: sample size, mediation analysis, linear model, SAS macro

Mediation analysis is used to review the comparative change in the amount of strength of association of the primary predictor with the outcome after adjustment for the mediator. Mediation models are very widely used in social sciences and biomedical sciences. Before conducting mediation studies, researchers want to know the sample size (i.e. number of subjects) required for achieving the adequate power when testing for mediation. To the author’s knowledge, there is no any SAS® procedure that produces sample size calculation for mediation analysis. The author presents a macro that implements the methodology for sample size calculation for mediation analysis written by Vittinghoff et al. (2009). It implements the methods to calculate sample sizes for the linear regression models. Very basic understanding of SAS is enough to use this macro. SAS Macro programming skill is not expected. When the macro is invoked, a series of windows will pop-up asking user to input required information. Output will be presented in SAS output window as well as in Microsoft word document. This macro is tested on Windows SAS 9.1 and above