Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pharmcat/forestplot.jl
A simple package to draw forest plots for meta-analysis study
https://github.com/pharmcat/forestplot.jl
forestplot julia meta-analysis plots
Last synced: about 13 hours ago
JSON representation
A simple package to draw forest plots for meta-analysis study
- Host: GitHub
- URL: https://github.com/pharmcat/forestplot.jl
- Owner: PharmCat
- License: mit
- Created: 2023-03-08T20:09:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-28T11:10:10.000Z (2 months ago)
- Last Synced: 2024-08-28T21:24:09.158Z (2 months ago)
- Topics: forestplot, julia, meta-analysis, plots
- Language: Julia
- Homepage:
- Size: 635 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ForestPlot [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://PharmCat.github.io/ForestPlot.jl/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://PharmCat.github.io/ForestPlot.jl/dev/) [![Build Status](https://github.com/PharmCat/ForestPlot.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/PharmCat/ForestPlot.jl/actions/workflows/CI.yml?query=branch%3Amain) [![Coverage](https://codecov.io/gh/PharmCat/ForestPlot.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/PharmCat/ForestPlot.jl)
A simple package to draw forest plots for meta-analysis study.
## Install
```
Pkg.add(url="https://github.com/PharmCat/ForestPlot.jl.git")
```## Docs
```
forestplot(ci; sourcelabel = "Source:", metriclabel = "OR", cilabel = "CI95%",
source = nothing, metric = nothing, printci = false,
summary = nothing, logscale = true, kwargs...)
```By default plot is logscaled.
* `ci` - vector (iterable) of confidence intervals bounds;
* `source` - vector of study names (String);
* `metric` - vector of metric estimates;
* `printci` - print confidence interval;
* `summary` - print summary object (Dict);
* `logscale` - if true CI will be transformed (`exp` function used);
* `cimsz` - CI marker size, `-1` or any value < 0 - auto;
* `cimszwts` - CI marker size weights (if `nothing` - `metric` will be used);
* `size` - size of plot;
* metriclabel = "OR" - label for metrics values;
* cilabel = "CI95%"- label for intervals values
* ps = 10 - font size in points;#### Example
```
using ForestPlotforestplot([[0.2,1.2], [0.8,1.4], [0.6, 0.8], [1.2, 1.6]],
sourcelabel = "Study:", metriclabel = "Estimate",
metric = [1.0, 1.2, 0.7, 1.3],
source = ["12345678901234567890", "B", "C", "D"])
```#### Summary object
Summary is a Dict() with keywords:
* :ci
* :est
* :vline (true/false or vlues for vertical lines)
* :markershape
* :markersize#### Example 1
```
forestplot([[0.2,1.2], [0.8,1.4], [0.6, 0.8], [1.2, 1.6]],
metric = [1.0, 1.2, 0.7, 1.3], source = ["A", "B", "C", "D"],
summary = Dict(:ci =>[0.8, 1.1], :est => 0.95, :markershape => :rtriangle), logscale = false)
```#### Example 2
```
ForestPlot.forestplot([[0.2,1.2], [0.8,1.4], [0.6, 0.8], [1.2, 1.6], [0.3, 0.7], [1.2, 1.5], [1.2, 1.3]],
metric = [1.0, 1.2, 0.7, 1.3, 0.5, 1.2, 1.3], source = ["A", "B", "C", "D", "E", "F", "G"],
sourcelabel = "Study:", metriclabel = "Estimate",
summary= Dict(:ci => [0.75,1.15], :est => 0.9),
logscale = true, printci = true, title = ["" "Title"], size = (800, 400))
```#### Example 3 (no source)
```
ForestPlot.forestplot([[0.2,1.2], [0.8,1.4], [0.6, 0.8], [1.2, 1.6], [0.3, 0.7], [1.2, 1.5], [1.2, 1.3]],
metric = [1.0, 1.2, 0.7, 1.3, 0.5, 1.2, 1.3],
sourcelabel = "Study:", metriclabel = "Estimate",
summary= Dict(:ci => [0.75,1.15], :est => 0.9),
logscale = true,title = "Title")
```