Zhiyong Zhang's Psychometric Website
 
Home Control Panel Login Register Search Submit Logout About me Contact me
My Research
Google
Web
This Site
Home > My Research > MedCI
Category: MedCI

What is MedCI?

MedCI stands for "Mediation confidence intervals". It is a stand-alone program to calculate confidence interval of mediation effect for a mediation model using several different methods. Before Version 2, it was also called BootMed. The program is designed to estimate the common used mediation model portrayed in the Figure below.

 

This model can be written as


M=b0+a*X+e1, and


Y=a0+c'*X+b*M+e2.


To test mediation, one needs to test H0: a*b=0.





What does MedCI do? 

The features of MedCI include:


  • Construction of confidence intervals of the medition effect based on the normal approximation
  • Construction of confidence intervals of the medition effect based on the resampling of raw data
  • Construction of confidence intervals of the medition effect based on the resampling of residual errors
  • Test homoscadestic using the modified Brown-Forsythe test statistic. With homoscadestic errors, the bootstrap raw data method is suggested. With homogeneous errors, the boostrap error method is suggested if the sample size < 150. Otherwise, the normal approximation method is sugggested. (details can be found in the manual and the related manuscript)
  • Calcuate CI based on requested alpha level
  • Customize the random number generation seed. For the same data and the same seed, the results will be the same.




Download 

MedCI can be downloaded at http://medci.psychstat.org/MedCI.exe. Along with it, the following file can be found useful.







How to use MedCI?


The current MedCI (Verstion 3) is a DOS program which can be run from the DOS command line. The DOS command line window can be activated by the following steps - "start" - "run" - "cmd" and then click OK. From the DOS window, go to the folder where you save the MedCI.ext file and then type in "medci" to run the program. (A windows interface is expected in the future.)


MedCI requires the following input parameters to run:



  • output file name: the file to save the results
  • data file name: the file with the data
  • methods to calculate CI: 1: NORM; 2: Bootstrap Raw data; 3: Bootstrap Error; 4: ALL
  • alpha level
  • random number seed: a number between 0 and 1.
  • bootstrap sample size: how many times to resample the data or errors

MedCI can also be run using a batch method. One can first put all the input parameters into a file with each parameter on one line (batch1.txt). Then on the command line, type "medci<batch1.txt". This method is espically useful for simulation studies.


A screenshot on the running process is followed.



 






Output of MedCI


The output of MedCI includes the estimates, standard errors, and confidence intervals for both mediation effect and all the other parameters. The output for the example 1 is given as below.


----------------------------------------------------------
| 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 11:24:55 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.781 seconds.


 The results from each bootstrap are saved in the file BTerror.txt.








Questions and comments 


Questions can be asked at http://www.statisticalexperts.com/forum/forumdisplay.php?fid=37


 


Under construction
Copyright © 2003-13 Zhiyong Zhang \'s Psychometric Website
Maintained by Zhiyong Zhang