# How to Install Meta-Analysis Commands in Stata

Stata, a statistical software package by StataCorp, boasts an impressive suite of meta-analysis features. **metan** is the Stata module for fixed and random effects meta-analysis. **metafunnel** “plots funnel plots: graphical displays used to examine whether the results of a meta-analysis may have been affected by publication or other types of bias.” These two commands did not come with Stata 10 by default; users of this and a number of subsequent versions of Stata have to download and install these user-written meta-analysis commands themselves.

Below is a summary of how I installed metan and metafunnel in Stata 10. Depending on your version of Stata, YMMV.

I essentially used the guide available in Chapter 18 of *Systematic Reviews in Health Care: Meta-Analysis in Context, 2nd Edition* “Meta-analysis in Stata”, by Sterne, Bradburn, and Egger, but with some small changes and additions which I will outline below.

**Step 1:** Update your installation of Stata.

`. update all`

**Step 2:** Install the user-written commands, e.g. metan, metafunnel.

I installed the commands from within Stata, i.e.

`Help → SJ and User-written Programs → STB`

You will see a list of commands associated with Stata Technical Bulletins (stb). I simply followed the instructions found in Sterne et al.’s guide:

I found that, in my installation of Stata, the packages had an underscore, e.g. sbe24_1, instead of a decimal point, e.g. sbe24.1.

In addition, I installed the following metafunnel command within Stata by typing:

`. ssc install metafunnel`

This command enables creation of funnel plots with pseudo 95% confidence limits.

**Step 3:** Check for updated versions or new commands:

`. update all`

`. search metan`

Having performed the steps above, I was unable to use the metan command to perform a fixed and random-effects meta-analysis. The problem was an old version of metan, specifically metan 1.0! You can check your version of metan:

`. which metan`

To update the version of metan, simply enter the following command on the Stata command line:

`. ssc install metaaggr, all replace`

Completing this last step enabled me to conduct a fixed and random-effects meta-analysis.

The steps above should not take longer than 5 minutes. Enjoy!

#stata