Skip to content

Multivariate (Ctrl+Alt+M)

Multivariate report

When to use it

Correlation matrix and PCA of two or more continuous columns. Use for exploratory analysis of a continuous multi-column data set: inter-column correlation structure, eigenvalue scree plot, and PC1-vs-PC2 scores. Continuous modeling type for all Y columns (no X zone). Fewer than two columns is rejected with an error.

GUI workflow

  1. Press Multivariate (Ctrl+Alt+M) — Launch Dialog opens with Multivariate active.
  2. Roles: Y, Response * (multiple, required, ≥ 2 columns), By (multiple, optional), Weight, Freq (optional).
  3. Assign at least two Y columns via the picker. X is not used on this platform.
  4. Run opens the floating report window.

Floating report window

  • Correlation Matrix — grid showing labels on the header row/column and correlation coefficients ({value:.2}).
  • Scree Plot — bar chart of eigenvalues (accent fill).
  • PC1 vs PC2 — brushable scatter of principal component scores (unselected/background, selected/accent).

Header ... menu: Toggle CI/PI, Save Residuals, Save Script to Table, Export SVG, Export JSON. Hidden rows are omitted; brushes drive selection.

Mathematical formulation

Correlation matrix (Pearson, sample, ddof = 1):

\[R_{jk} = \frac{\sum_i (x_{ij} - \bar{x}_{\cdot j})(x_{ik} - \bar{x}_{\cdot k})}{\sqrt{\sum_i (x_{ij}-\bar{x}_{\cdot j})^2 \sum_i (x_{ik}-\bar{x}_{\cdot k})^2}}\]

PCA (standardized mode; Standardized default) centers each column, divides by its sample standard deviation, and decomposes the \(p \times p\) correlation matrix \(R\) into eigenvalues and eigenvectors:

\[R\,v_k = \lambda_k\, v_k,\qquad \sum_k \lambda_k = p\]

Principal component scores are \(z_{il} = \sum_j \tilde{x}_{ij}\, v_{jl}\) for component \(l\). Explained variance ratio \(= \lambda_k / \sum_j \lambda_j\); cumulative variance is the running total of the ratios.

CLI parity — exact flags

Multivariate (Ctrl+Alt+M) — Launch Dialog → Run.

leap pca data.csv --columns <col1,col2,...> [--mode standardized|centered]

Default mode is standardized. JSON output: mode, columns, eigenvalues, explained_variance_ratio, cumulative_variance, loadings, scores.