rStats.js v1.3.0
    検索インデックスを準備しています...

    Function factanal

    • データ行列 (行が観測値) に対する、または options.covmat を指定した場合は共分散行列に対する、最尤法による因子分析です。R の factanal() と同等です。rotation には "varimax"、"promax"、"none" を指定できます。

      Parameters

      • x: readonly (readonly number[])[] | null

        データ行列 (行の配列) です。options.covmat を指定する場合は null です。

      • factors: number

        因子の数です。

      • options: FactanalOptions = {}

      戻り値 FactanalResult

      const R = [[1, 0.72, 0.63], [0.72, 1, 0.56], [0.63, 0.56, 1]];
      const fa = factanal(null, 1, { covmat: R });
      fa.uniquenesses; // [0.19, 0.36, 0.51]
      fa.loadings; // [[0.9], [0.8], [0.7]]
      // Factor scores need the data: factanal(x, 1, { scores: "regression" }).scores (one row per row of x)