Skip to main content

Crate solow_multivariate

Crate solow_multivariate 

Source
Expand description

§solow-multivariate

Multivariate statistical analysis for the Solow stack. This crate provides Pca (principal component analysis), Factor (principal-axis factor analysis), Manova (multivariate analysis of variance with the four classical test statistics) and CanCorr (canonical correlation analysis), all matching the conventions of the reference implementation (multivariate.pca, .factor, .manova, .cancorr).

use ndarray::array;
use solow_multivariate::Pca;

let data = array![
    [1.0, 2.0, 0.5],
    [2.0, 1.0, 1.5],
    [3.0, 0.0, 2.5],
    [4.0, 1.0, 0.0],
];
let pca = Pca::new(data).fit().unwrap();
assert_eq!(pca.eigenvals.len(), 3);
// Eigenvalues are sorted in descending order.
assert!(pca.eigenvals[0] >= pca.eigenvals[1]);

Structs§

CanCorr
A fitted canonical correlation analysis.
CanCorrTestRow
One row of the canonical-correlation approximate F-test table.
Factor
A principal-axis factor analysis awaiting estimation.
FactorResults
A fitted principal-axis factor model.
Manova
A fitted multivariate OLS, holding the quantities needed for hypothesis testing.
ManovaTest
A single MANOVA hypothesis result.
MultivariateStats
The four classical multivariate test statistics for a single hypothesis.
MvStat
One row of a multivariate statistics table: the statistic value, the numerator and denominator degrees of freedom of its F-approximation, the F-value and the upper-tail p-value.
Pca
A principal component analysis awaiting estimation.
PcaResults
Fitted principal component analysis.
Rotation
The result of a factor rotation: the rotated loadings L and the rotation matrix T.

Enums§

RotationMethod
The rotation method requested by rotate_factors.

Functions§

multivariate_stats
Compute the four multivariate statistics from the eigenvalues of inv(E + H) · H.
rotate_factors
Rotate the p × k loading matrix loadings with the named method.
rotate_with
Rotate using a parsed RotationMethod.