# friendly/heplots architecture

> Architecture diagram of the GitHub repository friendly/heplots, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/friendly/heplots
- Repository: https://github.com/friendly/heplots

## Overview

heplots is an R package for analyzing and visualizing multivariate linear models. Users apply its functions to MLMs or data to obtain HE plots, covariance and coefficient visualizations, and statistical diagnostics; repeated-measures effects are handled in transformed response space. The graph reflects capabilities documented in README.md. No source excerpts were supplied, so internal calls and dependencies between functions cannot be verified and are not drawn.

Main entry points: [`R/heplot.R`](https://github.com/friendly/heplots/blob/master/R/heplot.R) (2D HE plots), [`R/heplot3d.R`](https://github.com/friendly/heplots/blob/master/R/heplot3d.R) (3D HE plots), [`R/heplot1d.R`](https://github.com/friendly/heplots/blob/master/R/heplot1d.R) (1D HE plots), [`R/pairs.mlm.R`](https://github.com/friendly/heplots/blob/master/R/pairs.mlm.R) (Pairwise HE plots)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_he["HE visualization"]
  node_he2d["2D HE plots<br/>[heplot.R]"]
  node_he3d["3D HE plots<br/>[heplot3d.R]"]
  node_he1d["1D HE plots<br/>[heplot1d.R]"]
  node_pairwise["Pairwise HE plots<br/>[pairs.mlm.R]"]
  node_repeated["Repeated measures<br/>[termInfo.R]"]
  node_covplots["Covariance ellipses<br/>[covEllipses.R]"]
  node_coefplot["Coefficient plots<br/>[coefplot.mlm.R]"]
end

subgraph group_diagnostics["Model diagnostics"]
  node_boxm["Box M test<br/>[boxM.R]"]
  node_boxmplot["Box M plot<br/>[plot.boxM.R]"]
  node_variance["Variance tests<br/>[bartlettTests.R]"]
  node_levene["Levene tests<br/>[leveneTests.R]"]
  node_cqplot["Residual Q-Q plots<br/>[cqplot.R]"]
  node_distance["Mahalanobis distances<br/>[Mahalanobis.R]"]
  node_robust["Robust MLM<br/>[robmlm.R]"]
end

subgraph group_summaries["Model summaries"]
  node_summaries["MLM summaries<br/>[glance.mlm.R]"]
  node_univariate["Univariate statistics<br/>[uniStats.R]"]
  node_standardize["Standardized models<br/>[standardize.R]"]
end

subgraph group_data["Example data"]
  node_datasets[("Example datasets")]
end

node_user(("R user"))

node_user -->|"requests plots"| node_he2d
node_user -->|"requests plots"| node_he3d
node_user -->|"requests plots"| node_he1d
node_user -->|"requests plots"| node_pairwise
node_user -->|"requests plots"| node_covplots
node_user -->|"requests plots"| node_coefplot
node_user -->|"requests test"| node_boxm
node_user -->|"requests plot"| node_boxmplot
node_user -->|"requests tests"| node_variance
node_user -->|"requests tests"| node_levene
node_user -->|"requests plot"| node_cqplot
node_user -->|"requests distances"| node_distance
node_user -->|"requests fit"| node_robust
node_user -->|"requests summary"| node_summaries
node_user -->|"requests summary"| node_univariate
node_user -->|"requests standardization"| node_standardize
node_user -->|"loads data"| node_datasets

click node_he2d "https://github.com/friendly/heplots/blob/master/R/heplot.R"
click node_he3d "https://github.com/friendly/heplots/blob/master/R/heplot3d.R"
click node_he1d "https://github.com/friendly/heplots/blob/master/R/heplot1d.R"
click node_pairwise "https://github.com/friendly/heplots/blob/master/R/pairs.mlm.R"
click node_repeated "https://github.com/friendly/heplots/blob/master/R/termInfo.R"
click node_covplots "https://github.com/friendly/heplots/blob/master/R/covEllipses.R"
click node_coefplot "https://github.com/friendly/heplots/blob/master/R/coefplot.mlm.R"
click node_boxm "https://github.com/friendly/heplots/blob/master/R/boxM.R"
click node_boxmplot "https://github.com/friendly/heplots/blob/master/R/plot.boxM.R"
click node_variance "https://github.com/friendly/heplots/blob/master/R/bartlettTests.R"
click node_levene "https://github.com/friendly/heplots/blob/master/R/leveneTests.R"
click node_cqplot "https://github.com/friendly/heplots/blob/master/R/cqplot.R"
click node_distance "https://github.com/friendly/heplots/blob/master/R/Mahalanobis.R"
click node_robust "https://github.com/friendly/heplots/blob/master/R/robmlm.R"
click node_summaries "https://github.com/friendly/heplots/blob/master/R/glance.mlm.R"
click node_univariate "https://github.com/friendly/heplots/blob/master/R/uniStats.R"
click node_standardize "https://github.com/friendly/heplots/blob/master/R/standardize.R"
click node_datasets "https://github.com/friendly/heplots/tree/master/data"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_he2d,node_he3d,node_he1d,node_pairwise,node_repeated,node_covplots,node_coefplot,node_user toneBlue
class node_boxm,node_boxmplot,node_variance,node_levene,node_cqplot,node_distance,node_robust toneAmber
class node_summaries,node_univariate,node_standardize toneMint
class node_datasets toneRose
```

## Components

### HE visualization

- [2D HE plots](https://github.com/friendly/heplots/blob/master/R/heplot.R): `R/heplot.R`
- [3D HE plots](https://github.com/friendly/heplots/blob/master/R/heplot3d.R): `R/heplot3d.R`
- [1D HE plots](https://github.com/friendly/heplots/blob/master/R/heplot1d.R): `R/heplot1d.R`
- [Pairwise HE plots](https://github.com/friendly/heplots/blob/master/R/pairs.mlm.R): `R/pairs.mlm.R`
- [Repeated measures](https://github.com/friendly/heplots/blob/master/R/termInfo.R): `R/termInfo.R`
- [Covariance ellipses](https://github.com/friendly/heplots/blob/master/R/covEllipses.R): `R/covEllipses.R`
- [Coefficient plots](https://github.com/friendly/heplots/blob/master/R/coefplot.mlm.R): `R/coefplot.mlm.R`

### Model diagnostics

- [Box M test](https://github.com/friendly/heplots/blob/master/R/boxM.R): `R/boxM.R`
- [Box M plot](https://github.com/friendly/heplots/blob/master/R/plot.boxM.R): `R/plot.boxM.R`
- [Variance tests](https://github.com/friendly/heplots/blob/master/R/bartlettTests.R): `R/bartlettTests.R`
- [Levene tests](https://github.com/friendly/heplots/blob/master/R/leveneTests.R): `R/leveneTests.R`
- [Residual Q-Q plots](https://github.com/friendly/heplots/blob/master/R/cqplot.R): `R/cqplot.R`
- [Mahalanobis distances](https://github.com/friendly/heplots/blob/master/R/Mahalanobis.R): `R/Mahalanobis.R`
- [Robust MLM](https://github.com/friendly/heplots/blob/master/R/robmlm.R): `R/robmlm.R`

### Model summaries

- [MLM summaries](https://github.com/friendly/heplots/blob/master/R/glance.mlm.R): `R/glance.mlm.R`
- [Univariate statistics](https://github.com/friendly/heplots/blob/master/R/uniStats.R): `R/uniStats.R`
- [Standardized models](https://github.com/friendly/heplots/blob/master/R/standardize.R): `R/standardize.R`

### Example data

- [Example datasets](https://github.com/friendly/heplots/tree/master/data): `data`

### Other components

- **R user**

## Connections

- R user → 2D HE plots: requests plots (evidence: `README.md`)
- R user → 3D HE plots: requests plots (evidence: `README.md`)
- R user → 1D HE plots: requests plots (evidence: `README.md`)
- R user → Pairwise HE plots: requests plots (evidence: `README.md`)
- R user → Covariance ellipses: requests plots (evidence: `README.md`)
- R user → Coefficient plots: requests plots (evidence: `README.md`)
- R user → Box M test: requests test (evidence: `README.md`)
- R user → Box M plot: requests plot (evidence: `README.md`)
- R user → Variance tests: requests tests (evidence: `README.md`)
- R user → Levene tests: requests tests (evidence: `README.md`)
- R user → Residual Q-Q plots: requests plot (evidence: `README.md`)
- R user → Mahalanobis distances: requests distances (evidence: `README.md`)
- R user → Robust MLM: requests fit (evidence: `README.md`)
- R user → MLM summaries: requests summary (evidence: `README.md`)
- R user → Univariate statistics: requests summary (evidence: `README.md`)
- R user → Standardized models: requests standardization (evidence: `README.md`)
- R user → Example datasets: loads data (evidence: `README.md`)
