SlideShare a Scribd company logo
1 of 14
Factor Analysis
Factor Analysis
 Factor analysis is a useful tool for investigating variable relationships for complex
concepts such as socioeconomic status, dietary patterns, or psychological scales.
 It allows researchers to investigate concepts that are not easily measured directly
by collapsing a large number of variables into a few interpretable underlying
factors
 It has no interdependent or dependent variable as we were having in regression or
multiple regression.
What is a factor
 The key concept of factor analysis is that multiple observed variables have similar patterns of
responses because they are all associated with a latent (i.e. not directly measured) variable.
 For example, people may respond similarly to questions about income, education, and occupation,
which are all associated with the latent variable socioeconomic status.
 So in Simple words Common underlying factors are known as factors
Why we use Factor Analysis
 To lower down the no. of variables as it is a data summarization technique
 As in factor analysis we see the interrelationship between large no. of variables
and on the basis of that relationship we reduce many variable into some under
common(similar) underlying dimension.
 For example we have large no. of student’s data we can break them in smaller ones
by creating some category
1. Academic 2. Sports 3. Cultural
Understanding factor analysis
Regardless of purpose factor analysis is used in the determination of small no. of
factors based on particular inter-related quantitative variables.
Assumptions in FA
 Variables must be interrelated
 Sample size should be min. 50, preferred 100
 Observations min. 5, preferred 10
Issues
 Use Principal Component Analysis or Common Factor Analysis(Factor Analysis)
Basic Difference b/w PCA and FA
 PCA- In this total variance is taken Unique variance, error variance and hard
Variance.
 FA- Only those variables are taken whose variance is common or we can say only
Shared variance is taken.
Performing PCA
We will use the built-in dataset mtcars. The dataset has 32 instances for 11 variables.
It gives 11 features like ‘miles per gallon’, ‘number of cylinders’, ‘horsepower’, etc.
of 32 different models of cars. In the dataset, there are two categorical variables.
First is ‘vs’ that shows whether the car’s engine is ‘v’ shaped (1) or not (0).
The second one is ‘am’ that shows whether the car has an automatic transmission (1)
or manual (0).
We will have to ignore these two variables in the analysis as PCA is for numeric data
and cannot deal with categorical variables.
We will compute the principal components using the prcomp() function to achieve
this
Code-
 mtcars.pca<-prcomp(mtcars[,c(1:7,10,11)],center=TRUE, scale.=TRUE)
 summary(mtcars.pca)
Factor Analysis in R
 Factor analysis (FA) or exploratory factor analysis is another technique to reduce
the number of variables to a smaller set of factors. FA identifies the relationships
among a set of variables and narrows it down to a smaller set.
 We will be using the bfi dataset, which is a built-in dataset provided in R. It
comprises 25 different personality factors. We will require the psych and the GPA
rotation packages. So, install and load them into the library.
code
 parallel <- fa.parallel(bfi,fm="minres",fa='fa‘)
 Output
Parallel analysis suggests that the number of factors = 7 and the number of
components = NA
Applying Factor Analysis
 Now that we know how many factors we need, we can perform the factor analysis
using the fa() function.
 factors <- fa(bfi,nfactors=7,rotate='oblimin',fm='minres')
 print(factors)
Summary
 PCA and factor analysis in R are both multivariate analysis techniques. They
both work by reducing the number of variables while maximizing the
proportion of variance covered. The prime difference between the two
methods is the new variables derived.
 The principal components are normalized linear combinations of the
original variables. The factors are measurement models of latent variables.
While both techniques have the same purpose, they have different
approaches and results.

More Related Content

What's hot

Logistic regression
Logistic regressionLogistic regression
Logistic regressionsaba khan
 
Confirmatory Factor Analysis Presented by Mahfoudh Mgammal
Confirmatory Factor Analysis Presented by Mahfoudh MgammalConfirmatory Factor Analysis Presented by Mahfoudh Mgammal
Confirmatory Factor Analysis Presented by Mahfoudh MgammalDr. Mahfoudh Hussein Mgammal
 
2. sem exploratory factor analysis copy (2)
2. sem exploratory factor analysis   copy (2)2. sem exploratory factor analysis   copy (2)
2. sem exploratory factor analysis copy (2)Toshali Dey
 
Introduction to principal component analysis (pca)
Introduction to principal component analysis (pca)Introduction to principal component analysis (pca)
Introduction to principal component analysis (pca)Mohammed Musah
 
Sensitivity analysis
Sensitivity analysisSensitivity analysis
Sensitivity analysisSasquatch S
 
What if Analysis,Goal Seek Analysis,Sensitivity Analysis,Optimization Analysi...
What if Analysis,Goal Seek Analysis,Sensitivity Analysis,Optimization Analysi...What if Analysis,Goal Seek Analysis,Sensitivity Analysis,Optimization Analysi...
What if Analysis,Goal Seek Analysis,Sensitivity Analysis,Optimization Analysi...Sourav Das
 
Multinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsMultinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsAnirudha si
 
2.3 the simple regression model
2.3 the simple regression model2.3 the simple regression model
2.3 the simple regression modelRegmi Milan
 
Comparison statisticalsignificancetestir
Comparison statisticalsignificancetestirComparison statisticalsignificancetestir
Comparison statisticalsignificancetestirClaudia Ribeiro
 
Research Methology -Factor Analyses
Research Methology -Factor AnalysesResearch Methology -Factor Analyses
Research Methology -Factor AnalysesNeerav Shivhare
 
Factor analysis
Factor analysisFactor analysis
Factor analysis緯鈞 沈
 
Imputation Techniques For Market Research Datasets With Missing Values
Imputation Techniques For Market Research Datasets With Missing Values Imputation Techniques For Market Research Datasets With Missing Values
Imputation Techniques For Market Research Datasets With Missing Values Salford Systems
 

What's hot (20)

Factor analysis
Factor analysisFactor analysis
Factor analysis
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
Confirmatory Factor Analysis Presented by Mahfoudh Mgammal
Confirmatory Factor Analysis Presented by Mahfoudh MgammalConfirmatory Factor Analysis Presented by Mahfoudh Mgammal
Confirmatory Factor Analysis Presented by Mahfoudh Mgammal
 
Regressionanalysis
RegressionanalysisRegressionanalysis
Regressionanalysis
 
2. sem exploratory factor analysis copy (2)
2. sem exploratory factor analysis   copy (2)2. sem exploratory factor analysis   copy (2)
2. sem exploratory factor analysis copy (2)
 
Sensitivity Analysis
Sensitivity AnalysisSensitivity Analysis
Sensitivity Analysis
 
Introduction to principal component analysis (pca)
Introduction to principal component analysis (pca)Introduction to principal component analysis (pca)
Introduction to principal component analysis (pca)
 
Sensitivity analysis
Sensitivity analysisSensitivity analysis
Sensitivity analysis
 
Mathematical modeling
Mathematical modelingMathematical modeling
Mathematical modeling
 
What if Analysis,Goal Seek Analysis,Sensitivity Analysis,Optimization Analysi...
What if Analysis,Goal Seek Analysis,Sensitivity Analysis,Optimization Analysi...What if Analysis,Goal Seek Analysis,Sensitivity Analysis,Optimization Analysi...
What if Analysis,Goal Seek Analysis,Sensitivity Analysis,Optimization Analysi...
 
Multinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsMultinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationships
 
2.3 the simple regression model
2.3 the simple regression model2.3 the simple regression model
2.3 the simple regression model
 
Comparison statisticalsignificancetestir
Comparison statisticalsignificancetestirComparison statisticalsignificancetestir
Comparison statisticalsignificancetestir
 
Research Methology -Factor Analyses
Research Methology -Factor AnalysesResearch Methology -Factor Analyses
Research Methology -Factor Analyses
 
Sensitivity analysis
Sensitivity analysisSensitivity analysis
Sensitivity analysis
 
Week 3 unit 1
Week 3 unit 1Week 3 unit 1
Week 3 unit 1
 
Comparison and evaluation of alternative designs
Comparison and evaluation of alternative designsComparison and evaluation of alternative designs
Comparison and evaluation of alternative designs
 
Factor analysis
Factor analysisFactor analysis
Factor analysis
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
Imputation Techniques For Market Research Datasets With Missing Values
Imputation Techniques For Market Research Datasets With Missing Values Imputation Techniques For Market Research Datasets With Missing Values
Imputation Techniques For Market Research Datasets With Missing Values
 

Similar to Factor analysis in R by Aman Chauhan

Module 13 - Exploratory Factor Analysis.pptx
Module 13 - Exploratory Factor Analysis.pptxModule 13 - Exploratory Factor Analysis.pptx
Module 13 - Exploratory Factor Analysis.pptxSandipanMaji3
 
Factor analysis
Factor analysis Factor analysis
Factor analysis Nima
 
Introduction to data analysis
Introduction to data analysisIntroduction to data analysis
Introduction to data analysisRajaKrishnan M
 
cfa in mplus
cfa in mplus cfa in mplus
cfa in mplus SadhakNK
 
Factor Analysis (Marketing Research)
Factor Analysis (Marketing Research)Factor Analysis (Marketing Research)
Factor Analysis (Marketing Research)Mohammad Saif Alam
 
Operations Management VTU BE Mechanical 2015 Solved paper
Operations Management VTU BE Mechanical 2015 Solved paperOperations Management VTU BE Mechanical 2015 Solved paper
Operations Management VTU BE Mechanical 2015 Solved paperSomashekar S.M
 
Overview Of Factor Analysis Q Ti A
Overview Of  Factor  Analysis  Q Ti AOverview Of  Factor  Analysis  Q Ti A
Overview Of Factor Analysis Q Ti AZoha Qureshi
 
Exam Short Preparation on Data Analytics
Exam Short Preparation on Data AnalyticsExam Short Preparation on Data Analytics
Exam Short Preparation on Data AnalyticsHarsh Parekh
 
Applied Statistical Methods - Question & Answer on SPSS
Applied Statistical Methods - Question & Answer on SPSSApplied Statistical Methods - Question & Answer on SPSS
Applied Statistical Methods - Question & Answer on SPSSGökhan Ayrancıoğlu
 
Mb0040 statistics for management
Mb0040   statistics for managementMb0040   statistics for management
Mb0040 statistics for managementsmumbahelp
 
The t Test for Related.docx
The t Test for Related.docxThe t Test for Related.docx
The t Test for Related.docxchristalgrieg
 
Study on Evaluation of Venture Capital Based onInteractive Projection Algorithm
	Study on Evaluation of Venture Capital Based onInteractive Projection Algorithm	Study on Evaluation of Venture Capital Based onInteractive Projection Algorithm
Study on Evaluation of Venture Capital Based onInteractive Projection Algorithminventionjournals
 
Moderation and Meditation conducting in SPSS
Moderation and Meditation conducting in SPSSModeration and Meditation conducting in SPSS
Moderation and Meditation conducting in SPSSOsama Yousaf
 
SPSS statistics - get help using SPSS
SPSS statistics - get help using SPSSSPSS statistics - get help using SPSS
SPSS statistics - get help using SPSScsula its training
 

Similar to Factor analysis in R by Aman Chauhan (20)

Module 13 - Exploratory Factor Analysis.pptx
Module 13 - Exploratory Factor Analysis.pptxModule 13 - Exploratory Factor Analysis.pptx
Module 13 - Exploratory Factor Analysis.pptx
 
MR Multivariate.pptx
MR Multivariate.pptxMR Multivariate.pptx
MR Multivariate.pptx
 
Factor analysis
Factor analysis Factor analysis
Factor analysis
 
Introduction to data analysis
Introduction to data analysisIntroduction to data analysis
Introduction to data analysis
 
cfa in mplus
cfa in mplus cfa in mplus
cfa in mplus
 
FactorAnalysis.ppt
FactorAnalysis.pptFactorAnalysis.ppt
FactorAnalysis.ppt
 
Factor Analysis (Marketing Research)
Factor Analysis (Marketing Research)Factor Analysis (Marketing Research)
Factor Analysis (Marketing Research)
 
Operations Management VTU BE Mechanical 2015 Solved paper
Operations Management VTU BE Mechanical 2015 Solved paperOperations Management VTU BE Mechanical 2015 Solved paper
Operations Management VTU BE Mechanical 2015 Solved paper
 
ai.pptx
ai.pptxai.pptx
ai.pptx
 
Overview Of Factor Analysis Q Ti A
Overview Of  Factor  Analysis  Q Ti AOverview Of  Factor  Analysis  Q Ti A
Overview Of Factor Analysis Q Ti A
 
Exam Short Preparation on Data Analytics
Exam Short Preparation on Data AnalyticsExam Short Preparation on Data Analytics
Exam Short Preparation on Data Analytics
 
Correlation and regression in r
Correlation and regression in rCorrelation and regression in r
Correlation and regression in r
 
Applied Statistical Methods - Question & Answer on SPSS
Applied Statistical Methods - Question & Answer on SPSSApplied Statistical Methods - Question & Answer on SPSS
Applied Statistical Methods - Question & Answer on SPSS
 
Mb0040 statistics for management
Mb0040   statistics for managementMb0040   statistics for management
Mb0040 statistics for management
 
The t Test for Related.docx
The t Test for Related.docxThe t Test for Related.docx
The t Test for Related.docx
 
Wine.Final.Project.MJv3
Wine.Final.Project.MJv3Wine.Final.Project.MJv3
Wine.Final.Project.MJv3
 
Study on Evaluation of Venture Capital Based onInteractive Projection Algorithm
	Study on Evaluation of Venture Capital Based onInteractive Projection Algorithm	Study on Evaluation of Venture Capital Based onInteractive Projection Algorithm
Study on Evaluation of Venture Capital Based onInteractive Projection Algorithm
 
Factor analysis
Factor analysisFactor analysis
Factor analysis
 
Moderation and Meditation conducting in SPSS
Moderation and Meditation conducting in SPSSModeration and Meditation conducting in SPSS
Moderation and Meditation conducting in SPSS
 
SPSS statistics - get help using SPSS
SPSS statistics - get help using SPSSSPSS statistics - get help using SPSS
SPSS statistics - get help using SPSS
 

Recently uploaded

From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]📊 Markus Baersch
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一F La
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一fhwihughh
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改atducpo
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 

Recently uploaded (20)

From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
Decoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in ActionDecoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in Action
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 

Factor analysis in R by Aman Chauhan

  • 2. Factor Analysis  Factor analysis is a useful tool for investigating variable relationships for complex concepts such as socioeconomic status, dietary patterns, or psychological scales.  It allows researchers to investigate concepts that are not easily measured directly by collapsing a large number of variables into a few interpretable underlying factors  It has no interdependent or dependent variable as we were having in regression or multiple regression.
  • 3. What is a factor  The key concept of factor analysis is that multiple observed variables have similar patterns of responses because they are all associated with a latent (i.e. not directly measured) variable.  For example, people may respond similarly to questions about income, education, and occupation, which are all associated with the latent variable socioeconomic status.  So in Simple words Common underlying factors are known as factors
  • 4. Why we use Factor Analysis  To lower down the no. of variables as it is a data summarization technique  As in factor analysis we see the interrelationship between large no. of variables and on the basis of that relationship we reduce many variable into some under common(similar) underlying dimension.  For example we have large no. of student’s data we can break them in smaller ones by creating some category 1. Academic 2. Sports 3. Cultural
  • 5. Understanding factor analysis Regardless of purpose factor analysis is used in the determination of small no. of factors based on particular inter-related quantitative variables.
  • 6. Assumptions in FA  Variables must be interrelated  Sample size should be min. 50, preferred 100  Observations min. 5, preferred 10
  • 7. Issues  Use Principal Component Analysis or Common Factor Analysis(Factor Analysis)
  • 8. Basic Difference b/w PCA and FA  PCA- In this total variance is taken Unique variance, error variance and hard Variance.  FA- Only those variables are taken whose variance is common or we can say only Shared variance is taken.
  • 9. Performing PCA We will use the built-in dataset mtcars. The dataset has 32 instances for 11 variables. It gives 11 features like ‘miles per gallon’, ‘number of cylinders’, ‘horsepower’, etc. of 32 different models of cars. In the dataset, there are two categorical variables. First is ‘vs’ that shows whether the car’s engine is ‘v’ shaped (1) or not (0). The second one is ‘am’ that shows whether the car has an automatic transmission (1) or manual (0). We will have to ignore these two variables in the analysis as PCA is for numeric data and cannot deal with categorical variables. We will compute the principal components using the prcomp() function to achieve this
  • 11. Factor Analysis in R  Factor analysis (FA) or exploratory factor analysis is another technique to reduce the number of variables to a smaller set of factors. FA identifies the relationships among a set of variables and narrows it down to a smaller set.  We will be using the bfi dataset, which is a built-in dataset provided in R. It comprises 25 different personality factors. We will require the psych and the GPA rotation packages. So, install and load them into the library.
  • 12. code  parallel <- fa.parallel(bfi,fm="minres",fa='fa‘)  Output Parallel analysis suggests that the number of factors = 7 and the number of components = NA
  • 13. Applying Factor Analysis  Now that we know how many factors we need, we can perform the factor analysis using the fa() function.  factors <- fa(bfi,nfactors=7,rotate='oblimin',fm='minres')  print(factors)
  • 14. Summary  PCA and factor analysis in R are both multivariate analysis techniques. They both work by reducing the number of variables while maximizing the proportion of variance covered. The prime difference between the two methods is the new variables derived.  The principal components are normalized linear combinations of the original variables. The factors are measurement models of latent variables. While both techniques have the same purpose, they have different approaches and results.