Open alexpghayes opened 5 years ago
Example of Hasse diagrams
Possible visualize decomposition of variance
Would also be interesting to visually differentiate flows in some way to distinguish between fixed and random effects
We'd probably want to start with the balanced case and then extend to the unbalanced case.
This might be easy to achieve using the riverplot
package. Not sure if there is a related cousin in the ggplot
framework.
I have enjoyed networkD3::sankeyNetwork()
for Sankey diagrams. Maybe tidygraph
could help bridge the gap if we want an appealing API?
The Hasse diagram is inscrutable, but the decomposition rivers are nice. Can we leverage D3 and r2d3 at all?
What about the latest release of ggforce
? Could geom_parallel_sets()
help? Maybe ggalluvial
?
I (kinda) did a blog post on this based on a paper by Rouder et al.
One nice way to visualize mixed models is through a Hasse diagram, as in chapter 12 of this book. We should make a tool to make these visuals easy in R, especially the notation specific to mixed effects models. It would interesting to be able to from a
lme4
/brms
/rstanarm
model (or just the formula) to a Hasse diagram, and from a Hasse diagram to a model formula.I wonder if this could lead to visualizations of the decomposition of variance in a multilevel model as at https://mgb-research.netlify.com/post/visualizing-variance-in-multilevel-models-using-the-riverplot-package/.