Skip to content

Commit

Permalink
make title more generic
Browse files Browse the repository at this point in the history
  • Loading branch information
mjskay committed Aug 17, 2018
1 parent a32b100 commit 292af3b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@
.Rhistory
.RData
*.Rproj*
*_cache/
Binary file not shown.
Binary file not shown.
8 changes: 4 additions & 4 deletions hops_proportions.Rmd → proportions.Rmd
@@ -1,11 +1,11 @@
---
title: "Hypothetical Outcome Plots (HOPs) for proportions"
title: "Hypothetical outcome plots (HOPs) and quantile dotplots for proportions"
output: github_document
bibliography: references.bib
link-citations: true
---

Here is a quick example of hypothetical outcome plots (HOPs) for proportions
Here is a quick example of two frequency-framing approaches to visualizing the uncertainty in a proportion: hypothetical outcome plots (HOPs), which are useful when you are using a medium that supports animation, and quantile dotplots, which are useful when you are using a medium that does not support animation.

## Setup

Expand Down Expand Up @@ -47,7 +47,7 @@ One *possible* model for this data is as follows (N.B. this makes some strong as
m = stan_glm(count ~ group, family = poisson, data = df)
```

## HOPs
## Hypothetical outcome plots (HOPs)

Given that model, we could construct a HOPs [@Hullman2015; @Kale2018] bar chart illustrating the posterior distribution for the proportion in each group:

Expand All @@ -73,7 +73,7 @@ p = df %>%
animate(p, nframes = n_hops * 2, width = 600, height = 300)
```

## Quantile dotplots (static alternative)
## Quantile dotplots

If animation were not available (e.g. in a print medium), an alternative might be a quantile dotplot [@Kay2016; @Fernandes2018]:

Expand Down
17 changes: 10 additions & 7 deletions hops_proportions.md → proportions.md
@@ -1,8 +1,11 @@
Hypothetical Outcome Plots (HOPs) for proportions
Hypothetical outcome plots (HOPs) and quantile dotplots for proportions
================

Here is a quick example of hypothetical outcome plots (HOPs) for
proportions
Here is a quick example of two frequency-framing approaches to
visualizing the uncertainty in a proportion: hypothetical outcome plots
(HOPs), which are useful when you are using a medium that supports
animation, and quantile dotplots, which are useful when you are using a
medium that does not support animation.

## Setup

Expand Down Expand Up @@ -53,7 +56,7 @@ an example, your mileage may vary\!):
m = stan_glm(count ~ group, family = poisson, data = df)
```

## HOPs
## Hypothetical outcome plots (HOPs)

Given that model, we could construct a HOPs (Hullman, Resnick, and Adar
[2015](#ref-Hullman2015); Kale et al. [2019](#ref-Kale2018)) bar chart
Expand Down Expand Up @@ -82,9 +85,9 @@ p = df %>%
animate(p, nframes = n_hops * 2, width = 600, height = 300)
```

![](hops_proportions_files/figure-gfm/hops-1.gif)<!-- -->
![](proportions_files/figure-gfm/hops-1.gif)<!-- -->

## Quantile dotplots (static alternative)
## Quantile dotplots

If animation were not available (e.g. in a print medium), an alternative
might be a quantile dotplot (Kay et al. [2016](#ref-Kay2016); Fernandes
Expand Down Expand Up @@ -125,7 +128,7 @@ df %>%
scale_y_continuous(breaks = NULL)
```

![](hops_proportions_files/figure-gfm/quantile-dotplots-1.png)<!-- -->
![](proportions_files/figure-gfm/quantile-dotplots-1.png)<!-- -->

## References

Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 292af3b

Please sign in to comment.