The package the internet recommends is forestplot. I actually found this package very frustrating to use for two reasons. First, it is designed to work with meta-analyses, so the user interested in plotting just one regression result has to modify a lot of function arguments. Second, it appears impossible to modify the size of axis labels. The documentation suggests this is possible, but hours of messing around got me nowhere. This difficulty could be because forestplot uses the lattice plotting framework, and I am firmly in the base R and ggplot world. Not worth learning a new approach for a small problem.

I then researched how to make a forest plot in ggplot. Forest plots in ggplot aredoable, but I wasn’t pleased with the syntax required. Too much hacking for what should be really simple.

After having wasted many hours, I bit the bullet and wrote my own function to make a simple forestplot. (Many thanks to Alex Hughes for the initial code.) The code is very simple and so not worth releasing a R package. Indeed, the initial results for your model will probably require you to tweak the code. The main benefit of this function therefore is to save the time of setting up the initial code, and you should have a presentable .pdf file with just a couple of minutes of tweaking. The code is available at this Github repository and pasted below.

Some notes that may not be obvious from my comments. model should be the results of a regression. The plot has pretty wide margins, but they may not be wide enough depending on the length of your coefficient labels. Line width and point size are hard coded but very easy to change if you desire. The code is designed to produce .pdf output, and the outpath argument should end in ‘.pdf’.