SlideShare a Scribd company logo
R                           16


                         @holidayworking



                         2006   6   26




@holidayworking ()   R              16        2006   6   26   1 / 18
1




2




3   R




        @holidayworking ()   R   16   2006   6   26   2 / 18
)
      Twitter: @holidayworking
      :
      :
      :                   T-SQUARE        F1
      :
      Java, PL/SQL:
      Python, Ruby:




@holidayworking ()    R              16        2006   6   26   3 / 18
i                 i        i                   i


   :
       5




@holidayworking ()   R       16       2006   6   26       4 / 18
R




R                                                  factanal
factanal(x, factors, rotation = "varimax")

           x
     factors
    rotation                      (varimax)                     (promax)




    @holidayworking ()    R                   16              2006   6   26   5 / 18
5

                             1   60.00   64.00   55.00   55.00   55.00
                             2   41.00   44.00   46.00   55.00   44.00
                             3   55.00   63.00   62.00   58.00   70.00
                             4   60.00   45.00   44.00   53.00   49.00
                             5   58.00   56.00   61.00   67.00   58.00
                         (   )
                           195   64.00   47.00   52.00   42.00   48.00
                           196   39.00   36.00   35.00   38.00   36.00
                           197   42.00   43.00   43.00   57.00   39.00
                           198   64.00   58.00   47.00   33.00   56.00
                           199   49.00   47.00   46.00   49.00   54.00
                           200   51.00   51.00   49.00   50.00   46.00




    @holidayworking ()           R                 16                    2006   6   26   6 / 18
>         <- cor(            )
>

    1.0000000    0.5500166       0.1953799   0.1630274   0.4275140
    0.5500166    1.0000000       0.3317530   0.2944938   0.5178159
    0.1953799    0.3317530       1.0000000   0.5301135   0.4575891
    0.1630274    0.2944938       0.5301135   1.0000000   0.3876493
    0.4275140    0.5178159       0.4575891   0.3876493   1.0000000



                                             0.55
                                             0.53
                         4             0.39 0.52
⇒



    @holidayworking ()             R                     16          2006   6   26   7 / 18
1


> eigen(       )
$values
[1] 2.5573782 1.0656034 0.5058941 0.4461472 0.4249772

$vectors
             [,1]        [,2]       [,3]       [,4]        [,5]
[1,]   -0.4040025 0.57915506 -0.3526733 -0.30988872 0.53004894
[2,]   -0.4791362 0.36314955 -0.1046695 0.07323541 -0.78881668
[3,]   -0.4380493 -0.48395278 0.2494573 -0.71311577 -0.05603054
[4,]   -0.4064807 -0.54402387 -0.6062633 0.39786745 0.11383232
[5,]   -0.5000967 0.05029462 0.6594556 0.48142803 0.28411115




       @holidayworking ()   R                16                   2006   6   26   8 / 18
>                <- factanal(     , factors=2)
> print(              , cutoff=0)

Call:
factanal(x =        , factors = 2)
                                        Uniquenesses
                                        Loadings
Uniquenesses:
                                        SS loadings
0.471 0.395 0.379 0.548 0.491           Proportion Var
Loadings:                               Cumulative Var
     Factor1   Factor2
     0.722     0.084
     0.730     0.268
     0.177     0.768
     0.156     0.654
     0.537     0.470

                 Factor1 Factor2
SS loadings        1.399   1.317
Proportion Var     0.280   0.263
Cumulative Var     0.280   0.543

Test of the hypothesis that 2 factors are sufficient.
The chi square statistic is 0.08 on 1 degree of freedom.
      @holidayworking ()
The p-value is 0.782       R                 16            2006   6   26   9 / 18
1
>        <- 1 -                $uniquenesses
>

0.5288198 0.6049597 0.6213085 0.4523362 0.5087881




     @holidayworking ()    R                   16   2006   6   26   10 / 18
1       2
                         0.722   0.084   0.529
                         0.730   0.268   0.605
                         0.537   0.470   0.509
                         0.177   0.768   0.621
                         0.156   0.654   0.452
                         0.722   1.317


    1

⇒
    2

⇒



@holidayworking ()   R             16            2006   6   26   11 / 18
@holidayworking ()   R   16   2006   6   26   12 / 18
>                    <- factanal(     , factors=2,rotation="promax")
> print(                  , cutoff=0)

Call:
factanal(x =        , factors = 2, rotation = "promax")

Uniquenesses:

0.471 0.395 0.379 0.548 0.491

Loadings:
     Factor1   Factor2
      0.801    -0.156
      0.749     0.050
     -0.051     0.815
     -0.038     0.692
      0.461     0.348

                 Factor1 Factor2
SS loadings        1.419   1.291
Proportion Var     0.284   0.258
Cumulative Var     0.284   0.542

Test of the hypothesis that 2 factors are sufficient.
The chi square statistic is 0.08 on 1 degree of freedom.
      @holidayworking ()
The p-value is 0.782       R                 16               2006     6   26   13 / 18
>                        <- factanal(     , factors=2,rotation="none")
> print(                      , cutoff=0)

Call:
factanal(x =        , factors = 2, rotation = "none")

Uniquenesses:

0.471 0.395 0.379 0.548 0.491

Loadings:
     Factor1   Factor2
      0.583    -0.435
      0.714    -0.307
      0.657     0.436
      0.563     0.368
      0.713    -0.028

                 Factor1 Factor2
SS loadings        2.106   0.611
Proportion Var     0.421   0.122
Cumulative Var     0.421   0.543

Test of the hypothesis that 2 factors are sufficient.
The chi square statistic is 0.08 on 1 degree of freedom.
      @holidayworking ()
The p-value is 0.782       R                 16                2006   6   26   14 / 18
>                                   <- promax(loadings(              ), m=4)
> print(                                 )
$loadings

Loadings:
     Factor1 Factor2
      0.801 -0.156
      0.749
              0.815
              0.692
      0.461   0.348

                  Factor1 Factor2
SS loadings         1.419   1.291
Proportion Var      0.284   0.258
Cumulative Var      0.284   0.542

$rotmat
           [,1]      [,2]
[1,] 0.6062459 0.5303245
[2,] -1.0284319 1.0695617



     @holidayworking ()       R                   16      2006   6    26       15 / 18
rotmat

>             <- solve(t(                       $rotmat)%*%
                             $rotmat)
>
          [,1]      [,2]
[1,] 1.0000000 0.5462117
[2,] 0.5462117 1.0000000

    1                 2                 0.5462117




        @holidayworking ()   R             16                 2006   6   26   16 / 18
R                        factanal




@holidayworking ()   R         16   2006   6   26   17 / 18
@holidayworking ()   R   16   2006   6   26   18 / 18

More Related Content

PPTX
Histograma
PDF
第32回Tokyo.R#初心者セッション
PDF
R-study-tokyo02
PDF
母集団と標本
PDF
Tokyor15mod
KEY
ggplot2 に入門してみた
PDF
Rによるやさしい統計学第20章「検定力分析によるサンプルサイズの決定」
PPTX
Tokyo r30 anova_part2
Histograma
第32回Tokyo.R#初心者セッション
R-study-tokyo02
母集団と標本
Tokyor15mod
ggplot2 に入門してみた
Rによるやさしい統計学第20章「検定力分析によるサンプルサイズの決定」
Tokyo r30 anova_part2

Similar to Rによるやさしい統計学 第16章 : 因子分析 (20)

XLSX
Refuerzo
XLSX
Refuerzo
PDF
YamadaiR(Categorical Factor Analysis)
XLSX
Ejercicios 23 de agosto
PDF
21221
PPT
BS2506 tutorial3
PDF
Datamining r 1st
PDF
Palm ch1
PDF
第2回 基本演算,データ型の基礎,ベクトルの操作方法
PDF
Signal Processing Course : Theory for Sparse Recovery
PDF
Sect2 6
PDF
PRE: Datamining 2nd R
PDF
Datamining R 1st
PPT
Factorial design
PPT
Correlation analysis ppt
PDF
Visualizing, Modeling and Forecasting of Functional Time Series
PPTX
Presentación mata 1
PPTX
Presentación mata 1
XLS
Copy Of Consumer
PDF
05 Random Variables
Refuerzo
Refuerzo
YamadaiR(Categorical Factor Analysis)
Ejercicios 23 de agosto
21221
BS2506 tutorial3
Datamining r 1st
Palm ch1
第2回 基本演算,データ型の基礎,ベクトルの操作方法
Signal Processing Course : Theory for Sparse Recovery
Sect2 6
PRE: Datamining 2nd R
Datamining R 1st
Factorial design
Correlation analysis ppt
Visualizing, Modeling and Forecasting of Functional Time Series
Presentación mata 1
Presentación mata 1
Copy Of Consumer
05 Random Variables
Ad

More from Hidekazu Tanaka (10)

KEY
データベースのお話
KEY
フォントのお話
KEY
フォントのお話
KEY
バギングで構築された各決定木
KEY
アンサンブル学習
KEY
RHadoop の紹介
KEY
Rの紹介
KEY
Rで解く最適化問題 線型計画問題編
KEY
R meets Hadoop
PDF
RでMapreduce
データベースのお話
フォントのお話
フォントのお話
バギングで構築された各決定木
アンサンブル学習
RHadoop の紹介
Rの紹介
Rで解く最適化問題 線型計画問題編
R meets Hadoop
RでMapreduce
Ad

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
KodekX | Application Modernization Development
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Electronic commerce courselecture one. Pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Cloud computing and distributed systems.
cuic standard and advanced reporting.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation_ Review paper, used for researhc scholars
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Chapter 3 Spatial Domain Image Processing.pdf
Review of recent advances in non-invasive hemoglobin estimation
Spectral efficient network and resource selection model in 5G networks
Unlocking AI with Model Context Protocol (MCP)
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
NewMind AI Monthly Chronicles - July 2025
KodekX | Application Modernization Development
Understanding_Digital_Forensics_Presentation.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Network Security Unit 5.pdf for BCA BBA.
Electronic commerce courselecture one. Pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Machine learning based COVID-19 study performance prediction
Cloud computing and distributed systems.

Rによるやさしい統計学 第16章 : 因子分析

  • 1. R 16 @holidayworking 2006 6 26 @holidayworking () R 16 2006 6 26 1 / 18
  • 2. 1 2 3 R @holidayworking () R 16 2006 6 26 2 / 18
  • 3. ) Twitter: @holidayworking : : : T-SQUARE F1 : Java, PL/SQL: Python, Ruby: @holidayworking () R 16 2006 6 26 3 / 18
  • 4. i i i i : 5 @holidayworking () R 16 2006 6 26 4 / 18
  • 5. R R factanal factanal(x, factors, rotation = "varimax") x factors rotation (varimax) (promax) @holidayworking () R 16 2006 6 26 5 / 18
  • 6. 5 1 60.00 64.00 55.00 55.00 55.00 2 41.00 44.00 46.00 55.00 44.00 3 55.00 63.00 62.00 58.00 70.00 4 60.00 45.00 44.00 53.00 49.00 5 58.00 56.00 61.00 67.00 58.00 ( ) 195 64.00 47.00 52.00 42.00 48.00 196 39.00 36.00 35.00 38.00 36.00 197 42.00 43.00 43.00 57.00 39.00 198 64.00 58.00 47.00 33.00 56.00 199 49.00 47.00 46.00 49.00 54.00 200 51.00 51.00 49.00 50.00 46.00 @holidayworking () R 16 2006 6 26 6 / 18
  • 7. > <- cor( ) > 1.0000000 0.5500166 0.1953799 0.1630274 0.4275140 0.5500166 1.0000000 0.3317530 0.2944938 0.5178159 0.1953799 0.3317530 1.0000000 0.5301135 0.4575891 0.1630274 0.2944938 0.5301135 1.0000000 0.3876493 0.4275140 0.5178159 0.4575891 0.3876493 1.0000000 0.55 0.53 4 0.39 0.52 ⇒ @holidayworking () R 16 2006 6 26 7 / 18
  • 8. 1 > eigen( ) $values [1] 2.5573782 1.0656034 0.5058941 0.4461472 0.4249772 $vectors [,1] [,2] [,3] [,4] [,5] [1,] -0.4040025 0.57915506 -0.3526733 -0.30988872 0.53004894 [2,] -0.4791362 0.36314955 -0.1046695 0.07323541 -0.78881668 [3,] -0.4380493 -0.48395278 0.2494573 -0.71311577 -0.05603054 [4,] -0.4064807 -0.54402387 -0.6062633 0.39786745 0.11383232 [5,] -0.5000967 0.05029462 0.6594556 0.48142803 0.28411115 @holidayworking () R 16 2006 6 26 8 / 18
  • 9. > <- factanal( , factors=2) > print( , cutoff=0) Call: factanal(x = , factors = 2) Uniquenesses Loadings Uniquenesses: SS loadings 0.471 0.395 0.379 0.548 0.491 Proportion Var Loadings: Cumulative Var Factor1 Factor2 0.722 0.084 0.730 0.268 0.177 0.768 0.156 0.654 0.537 0.470 Factor1 Factor2 SS loadings 1.399 1.317 Proportion Var 0.280 0.263 Cumulative Var 0.280 0.543 Test of the hypothesis that 2 factors are sufficient. The chi square statistic is 0.08 on 1 degree of freedom. @holidayworking () The p-value is 0.782 R 16 2006 6 26 9 / 18
  • 10. 1 > <- 1 - $uniquenesses > 0.5288198 0.6049597 0.6213085 0.4523362 0.5087881 @holidayworking () R 16 2006 6 26 10 / 18
  • 11. 1 2 0.722 0.084 0.529 0.730 0.268 0.605 0.537 0.470 0.509 0.177 0.768 0.621 0.156 0.654 0.452 0.722 1.317 1 ⇒ 2 ⇒ @holidayworking () R 16 2006 6 26 11 / 18
  • 12. @holidayworking () R 16 2006 6 26 12 / 18
  • 13. > <- factanal( , factors=2,rotation="promax") > print( , cutoff=0) Call: factanal(x = , factors = 2, rotation = "promax") Uniquenesses: 0.471 0.395 0.379 0.548 0.491 Loadings: Factor1 Factor2 0.801 -0.156 0.749 0.050 -0.051 0.815 -0.038 0.692 0.461 0.348 Factor1 Factor2 SS loadings 1.419 1.291 Proportion Var 0.284 0.258 Cumulative Var 0.284 0.542 Test of the hypothesis that 2 factors are sufficient. The chi square statistic is 0.08 on 1 degree of freedom. @holidayworking () The p-value is 0.782 R 16 2006 6 26 13 / 18
  • 14. > <- factanal( , factors=2,rotation="none") > print( , cutoff=0) Call: factanal(x = , factors = 2, rotation = "none") Uniquenesses: 0.471 0.395 0.379 0.548 0.491 Loadings: Factor1 Factor2 0.583 -0.435 0.714 -0.307 0.657 0.436 0.563 0.368 0.713 -0.028 Factor1 Factor2 SS loadings 2.106 0.611 Proportion Var 0.421 0.122 Cumulative Var 0.421 0.543 Test of the hypothesis that 2 factors are sufficient. The chi square statistic is 0.08 on 1 degree of freedom. @holidayworking () The p-value is 0.782 R 16 2006 6 26 14 / 18
  • 15. > <- promax(loadings( ), m=4) > print( ) $loadings Loadings: Factor1 Factor2 0.801 -0.156 0.749 0.815 0.692 0.461 0.348 Factor1 Factor2 SS loadings 1.419 1.291 Proportion Var 0.284 0.258 Cumulative Var 0.284 0.542 $rotmat [,1] [,2] [1,] 0.6062459 0.5303245 [2,] -1.0284319 1.0695617 @holidayworking () R 16 2006 6 26 15 / 18
  • 16. rotmat > <- solve(t( $rotmat)%*% $rotmat) > [,1] [,2] [1,] 1.0000000 0.5462117 [2,] 0.5462117 1.0000000 1 2 0.5462117 @holidayworking () R 16 2006 6 26 16 / 18
  • 17. R factanal @holidayworking () R 16 2006 6 26 17 / 18
  • 18. @holidayworking () R 16 2006 6 26 18 / 18