Publications by Michael Friendly
Coefficient plots for linear models
Coefficient plots are often more useful than tables1 but plotting raw coefficients can be misleading when the predictors are on different scales. The packages arm and modelsummary, and later, ggstats are used to illustrate these plots. In the process, I discover some other problems with naive use of coefficient plots. I compare plotting: raw...
22210 sym R (6456 sym/28 pcs) 10 img
Coefficient plots for linear models
Coefficient plots are often more useful than tables but plotting raw coefficients can be misleading when the predictors are on different scales. The packages arm and modelsummary are used to illustrate these plots, discovering some other problems with naive use of coefficient plots. I compare plotting: raw coefficients standardized coefficient...
9539 sym R (4814 sym/17 pcs) 6 img
Coefficient plots for linear models
Coefficient plots are often more useful than tables but plotting raw coefficients can be misleading when the predictors are on different scales. The packages arm and modelsummary are used to illustrate these plots, discovering some other problems with naive use of coefficient plots. I compare plotting: raw coefficients standardized coefficient...
11406 sym R (4984 sym/18 pcs) 7 img
Testing seriation
Here are a couple of examples from DDAR, trying to use the seriation package for reordering rows and columns of frequency tables to make mosaic displays more coherent. The idea is pretty simple, but I’m looking for some technique that can be used semi-automatically to permute rows/cols by CA dimensions in the vcd package or vcdExtra This d...
9568 sym R (2036 sym/22 pcs) 8 img
Grid approximation example
Load packages library(ggplot2) library(dplyr) library(purrr) library(tidyr) Calculations Grid approximation is easy in this example, or indeed in any case with a single parameter in a bounded range. Simply calculate posteriors along a grid from 0 to 1, for a sequence of 6 W in 9 tosses. One key to this is that dbinom() is vectorized, so we...
8867 sym R (5299 sym/19 pcs) 3 img
Software tools for research, teaching and writing
In my work, I now largely use: Research papers: Rmarkdown .Rmd for things R and mathy; MS Word for mostly text and images Presentations: Still using PPT; tried Quarto and reveal.js slides, but doesn’t work for my style Teaching: R notebooks (.R with #' comments) and.Rmd` works loverly! But still old-school on tools that work very well for ...
2587 sym 10 img
Chapter 5: Rethinking via OLS
For the main problem of this chapter – divorce rate, in relation to marriate rate and median age at marriage, what if we started with a classical linear multivariate regression model? What would we do differently? how does OLS thinking guide our analysis? how does the OLS result compare with the Bayesian approach of this chapter? If I were...
11171 sym R (6052 sym/34 pcs) 8 img
Visualizing Multivariate Linear Models in R: Iris Examples
\[ \def\vec#1{\mathbf{#1}} \def\mat#1{\mathbf{#1}} \def\H{\mathbf{H}} \def\E{\mathbf{E}} \def\trans{^\mathsf{T}} % transpose \def\period{\:\: .} \def\comma{\:\: ,} \def\inv#1{\mat{#1}^{-1}} \def\half#1{\mat{#1}^{-1/2}} \] Summary This article illustrates some graphical methods that we have developed over the last ten years that aid in...
14402 sym R (3957 sym/18 pcs) 14 img
Penguins data: MANOVA and HE plots
Introduction The multivariate EDA of the penguins data brought some simplicity to understanding the quantitative variables of body mass, flipper length and the two culmen variables. One main virtue of the graphical methods used there was that species could be represented visually in the plot and annotated with separate data ellipses and regressio...
10357 sym R (3542 sym/22 pcs) 8 img
Penguin data: Multivariate EDA
Penguin data: Multivariate EDA Michael Friendly Penguins are multivariate creatures! What can we learn from this dataset without specialized biological knowledge? Here we examine a basic set of multivariate views of these pengiuns. An informative scatterplot matrix (car::scatterplotMatrix, GGally::ggpairs) A principal components analysis (princ...
5639 sym R (2971 sym/11 pcs) 4 img