1. The program is written in C++ to analyze the meditaion effects. Two libraries are used: Newmat and newran * Davies, R.B. (1994) Writing a matrix package in C++. In OON-SKI'94: The second annual object-oriented numerics conference, pp 207-213. Rogue Wave Software, Corvallis. * Eddelbuttel, Dirk (1996) Object-oriented econometrics: matrix programming in C++ using GCC and Newmat. Journal of A pplied Econometrics, Vol 11, No 2, pp 199-209. 2. After double clicking on the executable file, a DOS window will pop out and require the input of parameters to run the program. The first required input is the name of the file in which one wants to save the analysis results. The second required input is the name of the data file. The data file should be a text file with the following sequence of variables, Y, X, and M. The last required input is the bootstrap sample size. We suggest a bootstrap sample size no less than 1000. Also, alpha level and random number seed can be specified. An example on this procedure is illustrated as follows. ---------------------------------------------------------- | Program name: MedCI.exe (V3.0) | | By Zhiyong Zhang & Lijuan Wang | | Email johnnyzhz@gmail.com for questions and comments | | See readme.txt for more information | ---------------------------------------------------------- ****************************************************************** * NOTICE * * Although this program has been tested to perform as expected * * in many cases, we cannot guarantee its performance under * * all possible circumstances. * * Users can use it for free at their own risks. * ****************************************************************** The BootMed program is ran on Sat Apr 28 10:34:29 2007 Please input the output file name: output1.txt Please input the file name of the data: data1.txt The residual errors are homogeneous and bootstraping error method can be used! The modified Brown-Forsythe test for error 1 is 0.480835 with df=(2,84) with the critical value 3.14995. The modified Brown-Forsythe test for error 2 is 1.11214 with df=(8,92) with the critical value 1.98907. Please choose the method(s), Type 1, 2, 3, or 4 1: NORM; 2: Bootstrap Raw data; 3: Bootstrap Error; 4: ALL 3 Please specify the alpha level (a number between 0 and 1 only): 0.05 Please specify the random number seed (a number between 0 and 1 only): .5 Please input the bootstrap sample size for bootstraping error data: 1000 -------------------------------------------------------- |Bootstrap error confidence intervals for mediation | -------------------------------------------------------- The estimate of the mediation effect a*b (standard error) 0.20682499 ( 0.061322622) Confidence interval of mediation effect Lower Upper CI(i) 0.086634912 0.32701506 CI(ii) 0.080456421 0.31638565 CI(iii) 0.097264315 0.33319355 Estimates, Confidence interval, and SE for all parameters Parameter Estimate Lower Upper SE a0 0.06043472 -0.12606978 0.2570185 0.096804512 c' 0.031652914 -0.19542291 0.26804153 0.11822907 b 0.36591591 0.21396413 0.50707111 0.075745716 b0 0.021792112 -0.17832243 0.22308179 0.10271346 a 0.56522545 0.33027905 0.78879901 0.11777726 a*b 0.20682499 0.097264315 0.33319355 0.061322622 sigeM2 1.0250739 0.73523948 1.2782183 0.14023728 sigeY2 0.91876974 0.63047977 1.19398 0.14995039 The total running time is 0.75 seconds. The results from each bootstrap are saved in the file BTerror.txt.