pub struct Factor { /* private fields */ }Expand description
A principal-axis factor analysis awaiting estimation.
Construct from a correlation matrix with Factor::from_corr or from a raw
nobs × nvar data matrix with Factor::from_data (which standardises the
columns into a Pearson correlation matrix), set the number of factors, then
call Factor::fit.
Implementations§
Source§impl Factor
impl Factor
Sourcepub fn from_corr(corr: Array2<f64>, n_factor: usize, smc: bool) -> Self
pub fn from_corr(corr: Array2<f64>, n_factor: usize, smc: bool) -> Self
A factor analysis on a correlation (or covariance) matrix corr.
n_factor is the number of factors to extract; smc selects squared
multiple correlations as the initial communality estimate (matching the
reference default smc=True).
Sourcepub fn from_data(data: &Array2<f64>, n_factor: usize, smc: bool) -> Self
pub fn from_data(data: &Array2<f64>, n_factor: usize, smc: bool) -> Self
A factor analysis on a raw nobs × nvar data matrix. The columns are
turned into a Pearson correlation matrix (population covariance scaled by
the standard deviations) before estimation.
Sourcepub fn fit(&self, maxiter: usize, tol: f64) -> Result<FactorResults>
pub fn fit(&self, maxiter: usize, tol: f64) -> Result<FactorResults>
Estimate the factor model with the iterative principal-axis method.
maxiter bounds the number of communality-update iterations and tol
is the convergence threshold on the change in communalities (the
reference requires 0 < tol <= 0.01).