I am importing required libaries to know the correlation of questions with the survey data.
library(tidyverse)
## Warning: package 'dplyr' was built under R version 4.3.2
## Warning: package 'lubridate' was built under R version 4.3.2
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.3 ✔ readr 2.1.4
## ✔ forcats 1.0.0 ✔ stringr 1.5.0
## ✔ ggplot2 3.4.3 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.0
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(readr)
library(corrplot)
## Warning: package 'corrplot' was built under R version 4.3.2
## corrplot 0.92 loaded
library(ISLR)
## Warning: package 'ISLR' was built under R version 4.3.2
library(psych)
## Warning: package 'psych' was built under R version 4.3.2
##
## Attaching package: 'psych'
##
## The following objects are masked from 'package:ggplot2':
##
## %+%, alpha
survey_data <- read_delim("C:/Users/Surya CST/Downloads/simulated_survey_data.csv",delim=",",show_col_types = FALSE)
head(survey_data)
## # A tibble: 6 × 21
## Performance_Expectancy_Q1 Performance_Expectancy_Q2 Performance_Expectancy_Q3
## <dbl> <dbl> <dbl>
## 1 4 4 4
## 2 5 4 1
## 3 3 4 4
## 4 5 5 2
## 5 5 3 1
## 6 2 1 5
## # ℹ 18 more variables: Effort_Expectancy_Q1 <dbl>, Effort_Expectancy_Q2 <dbl>,
## # Effort_Expectancy_Q3 <dbl>, Social_Influence_Q1 <dbl>,
## # Social_Influence_Q2 <dbl>, Social_Influence_Q3 <dbl>,
## # Hedonic_Motivation_Q1 <dbl>, Hedonic_Motivation_Q2 <dbl>,
## # Hedonic_Motivation_Q3 <dbl>, Facilitating_Conditions_Q1 <dbl>,
## # Facilitating_Conditions_Q2 <dbl>, Facilitating_Conditions_Q3 <dbl>,
## # Habit_Q1 <dbl>, Habit_Q2 <dbl>, Habit_Q3 <dbl>, …
factor_columns <- survey_data[, grep("_Q[1-3]$", colnames(survey_data))]
# Extract columns corresponding to factors
performance_expectancy <- factor_columns[, grep("Performance_Expectancy", colnames(factor_columns))]
effort_expectancy <- factor_columns[, grep("Effort_Expectancy", colnames(factor_columns))]
social_influence <- factor_columns[, grep("Social_Influence", colnames(factor_columns))]
hedonic_motivation <- factor_columns[, grep("Hedonic_Motivation", colnames(factor_columns))]
facilitating_conditions <- factor_columns[, grep("Facilitating_Conditions", colnames(factor_columns))]
habit <- factor_columns[, grep("Habit", colnames(factor_columns))]
intention_to_use <- factor_columns[, grep("Intention_to_Use", colnames(factor_columns))]
# Calculate the correlation between factors
correlation_matrix <- cor(cbind(performance_expectancy, effort_expectancy, social_influence, hedonic_motivation,
facilitating_conditions, habit, intention_to_use))
print(correlation_matrix)
## Performance_Expectancy_Q1 Performance_Expectancy_Q2
## Performance_Expectancy_Q1 1.000000000 -0.006640644
## Performance_Expectancy_Q2 -0.006640644 1.000000000
## Performance_Expectancy_Q3 -0.142794641 0.016683946
## Effort_Expectancy_Q1 -0.031788727 -0.299465955
## Effort_Expectancy_Q2 -0.052953639 0.114442911
## Effort_Expectancy_Q3 -0.165952247 -0.134667190
## Social_Influence_Q1 0.001699884 0.054388723
## Social_Influence_Q2 -0.069861162 -0.158163252
## Social_Influence_Q3 -0.061641032 0.234478952
## Hedonic_Motivation_Q1 0.126189989 0.191737082
## Hedonic_Motivation_Q2 -0.223757242 0.138600866
## Hedonic_Motivation_Q3 0.057693373 -0.114070256
## Facilitating_Conditions_Q1 -0.042882307 0.226529470
## Facilitating_Conditions_Q2 0.108352216 -0.108216401
## Facilitating_Conditions_Q3 -0.157601988 -0.034020295
## Habit_Q1 -0.119543411 0.008513229
## Habit_Q2 -0.049638141 -0.041567274
## Habit_Q3 0.102159000 -0.051420359
## Intention_to_Use_Q1 -0.160741341 0.208930573
## Intention_to_Use_Q2 0.014616774 -0.066735784
## Intention_to_Use_Q3 0.177700687 0.123600713
## Performance_Expectancy_Q3 Effort_Expectancy_Q1
## Performance_Expectancy_Q1 -0.142794641 -0.031788727
## Performance_Expectancy_Q2 0.016683946 -0.299465955
## Performance_Expectancy_Q3 1.000000000 0.121900669
## Effort_Expectancy_Q1 0.121900669 1.000000000
## Effort_Expectancy_Q2 -0.021381533 0.042421784
## Effort_Expectancy_Q3 -0.031270365 0.193880022
## Social_Influence_Q1 0.081144915 -0.191445921
## Social_Influence_Q2 0.196168392 0.263097890
## Social_Influence_Q3 0.099744748 -0.095693817
## Hedonic_Motivation_Q1 0.251238894 0.178395038
## Hedonic_Motivation_Q2 0.079710301 -0.033944661
## Hedonic_Motivation_Q3 0.006039531 0.252010369
## Facilitating_Conditions_Q1 0.107737449 -0.160709366
## Facilitating_Conditions_Q2 0.060917250 0.110475574
## Facilitating_Conditions_Q3 0.168396364 -0.123172951
## Habit_Q1 -0.063946886 -0.032368235
## Habit_Q2 -0.062092296 -0.069296346
## Habit_Q3 0.204015079 0.052228873
## Intention_to_Use_Q1 -0.045445622 -0.008453050
## Intention_to_Use_Q2 -0.039548023 0.121900669
## Intention_to_Use_Q3 -0.095668921 0.005931588
## Effort_Expectancy_Q2 Effort_Expectancy_Q3
## Performance_Expectancy_Q1 -0.05295364 -0.165952247
## Performance_Expectancy_Q2 0.11444291 -0.134667190
## Performance_Expectancy_Q3 -0.02138153 -0.031270365
## Effort_Expectancy_Q1 0.04242178 0.193880022
## Effort_Expectancy_Q2 1.00000000 0.010957748
## Effort_Expectancy_Q3 0.01095775 1.000000000
## Social_Influence_Q1 0.18677152 -0.029547718
## Social_Influence_Q2 -0.11070958 0.047621207
## Social_Influence_Q3 -0.07284839 -0.087169370
## Hedonic_Motivation_Q1 -0.01173854 0.055181379
## Hedonic_Motivation_Q2 0.03572362 0.164476837
## Hedonic_Motivation_Q3 -0.21121372 0.092855354
## Facilitating_Conditions_Q1 0.01865458 0.009743646
## Facilitating_Conditions_Q2 -0.19251961 -0.052682519
## Facilitating_Conditions_Q3 0.15932533 0.010496052
## Habit_Q1 0.04584506 -0.280441660
## Habit_Q2 -0.32040100 0.019416487
## Habit_Q3 0.08578905 0.040472896
## Intention_to_Use_Q1 -0.21238206 -0.181028914
## Intention_to_Use_Q2 -0.30646864 -0.083387640
## Intention_to_Use_Q3 0.06928347 0.049029034
## Social_Influence_Q1 Social_Influence_Q2
## Performance_Expectancy_Q1 0.0016998835 -0.06986116
## Performance_Expectancy_Q2 0.0543887230 -0.15816325
## Performance_Expectancy_Q3 0.0811449151 0.19616839
## Effort_Expectancy_Q1 -0.1914459208 0.26309789
## Effort_Expectancy_Q2 0.1867715156 -0.11070958
## Effort_Expectancy_Q3 -0.0295477175 0.04762121
## Social_Influence_Q1 1.0000000000 -0.03512117
## Social_Influence_Q2 -0.0351211657 1.00000000
## Social_Influence_Q3 0.3789839200 0.14390517
## Hedonic_Motivation_Q1 0.0003768229 0.19859190
## Hedonic_Motivation_Q2 -0.1593594757 -0.07283383
## Hedonic_Motivation_Q3 -0.1015814074 0.26120954
## Facilitating_Conditions_Q1 -0.0355310061 -0.13704827
## Facilitating_Conditions_Q2 -0.1611718933 0.10958461
## Facilitating_Conditions_Q3 0.0705286911 0.04366556
## Habit_Q1 0.1711686761 0.16858578
## Habit_Q2 0.0429596209 0.20578712
## Habit_Q3 0.0883039043 0.02405355
## Intention_to_Use_Q1 -0.2389140997 0.35296341
## Intention_to_Use_Q2 -0.3032257354 0.06194791
## Intention_to_Use_Q3 0.0964252084 -0.02913858
## Social_Influence_Q3 Hedonic_Motivation_Q1
## Performance_Expectancy_Q1 -0.06164103 0.1261899893
## Performance_Expectancy_Q2 0.23447895 0.1917370818
## Performance_Expectancy_Q3 0.09974475 0.2512388940
## Effort_Expectancy_Q1 -0.09569382 0.1783950376
## Effort_Expectancy_Q2 -0.07284839 -0.0117385366
## Effort_Expectancy_Q3 -0.08716937 0.0551813789
## Social_Influence_Q1 0.37898392 0.0003768229
## Social_Influence_Q2 0.14390517 0.1985918989
## Social_Influence_Q3 1.00000000 0.1982484535
## Hedonic_Motivation_Q1 0.19824845 1.0000000000
## Hedonic_Motivation_Q2 -0.13448989 0.0707007174
## Hedonic_Motivation_Q3 0.09540296 -0.0138549890
## Facilitating_Conditions_Q1 0.05299928 0.3213389560
## Facilitating_Conditions_Q2 -0.27594632 0.0618112791
## Facilitating_Conditions_Q3 -0.14167248 0.0052204019
## Habit_Q1 0.29514939 -0.1224636369
## Habit_Q2 0.18286770 0.0226571424
## Habit_Q3 0.11415030 0.2791092191
## Intention_to_Use_Q1 0.00191946 0.1261261304
## Intention_to_Use_Q2 -0.12074364 0.2811482862
## Intention_to_Use_Q3 0.01975459 0.1988354555
## Hedonic_Motivation_Q2 Hedonic_Motivation_Q3
## Performance_Expectancy_Q1 -0.223757242 0.057693373
## Performance_Expectancy_Q2 0.138600866 -0.114070256
## Performance_Expectancy_Q3 0.079710301 0.006039531
## Effort_Expectancy_Q1 -0.033944661 0.252010369
## Effort_Expectancy_Q2 0.035723621 -0.211213719
## Effort_Expectancy_Q3 0.164476837 0.092855354
## Social_Influence_Q1 -0.159359476 -0.101581407
## Social_Influence_Q2 -0.072833831 0.261209536
## Social_Influence_Q3 -0.134489893 0.095402962
## Hedonic_Motivation_Q1 0.070700717 -0.013854989
## Hedonic_Motivation_Q2 1.000000000 -0.082967706
## Hedonic_Motivation_Q3 -0.082967706 1.000000000
## Facilitating_Conditions_Q1 -0.097649492 -0.246149815
## Facilitating_Conditions_Q2 0.020143702 -0.043413573
## Facilitating_Conditions_Q3 -0.084912411 -0.322729979
## Habit_Q1 -0.005059843 -0.036607569
## Habit_Q2 -0.194198654 0.051751154
## Habit_Q3 -0.037466340 -0.080904917
## Intention_to_Use_Q1 -0.016106189 0.015825706
## Intention_to_Use_Q2 0.174104079 -0.034224011
## Intention_to_Use_Q3 -0.102613815 0.147723034
## Facilitating_Conditions_Q1
## Performance_Expectancy_Q1 -0.042882307
## Performance_Expectancy_Q2 0.226529470
## Performance_Expectancy_Q3 0.107737449
## Effort_Expectancy_Q1 -0.160709366
## Effort_Expectancy_Q2 0.018654577
## Effort_Expectancy_Q3 0.009743646
## Social_Influence_Q1 -0.035531006
## Social_Influence_Q2 -0.137048272
## Social_Influence_Q3 0.052999281
## Hedonic_Motivation_Q1 0.321338956
## Hedonic_Motivation_Q2 -0.097649492
## Hedonic_Motivation_Q3 -0.246149815
## Facilitating_Conditions_Q1 1.000000000
## Facilitating_Conditions_Q2 0.079721987
## Facilitating_Conditions_Q3 0.241651287
## Habit_Q1 0.130919944
## Habit_Q2 -0.040925013
## Habit_Q3 0.146005461
## Intention_to_Use_Q1 0.079556630
## Intention_to_Use_Q2 0.012674994
## Intention_to_Use_Q3 0.200719480
## Facilitating_Conditions_Q2
## Performance_Expectancy_Q1 0.108352216
## Performance_Expectancy_Q2 -0.108216401
## Performance_Expectancy_Q3 0.060917250
## Effort_Expectancy_Q1 0.110475574
## Effort_Expectancy_Q2 -0.192519615
## Effort_Expectancy_Q3 -0.052682519
## Social_Influence_Q1 -0.161171893
## Social_Influence_Q2 0.109584609
## Social_Influence_Q3 -0.275946322
## Hedonic_Motivation_Q1 0.061811279
## Hedonic_Motivation_Q2 0.020143702
## Hedonic_Motivation_Q3 -0.043413573
## Facilitating_Conditions_Q1 0.079721987
## Facilitating_Conditions_Q2 1.000000000
## Facilitating_Conditions_Q3 -0.018785841
## Habit_Q1 -0.119037293
## Habit_Q2 0.123049189
## Habit_Q3 -0.030675453
## Intention_to_Use_Q1 0.075520123
## Intention_to_Use_Q2 0.003807328
## Intention_to_Use_Q3 0.146850624
## Facilitating_Conditions_Q3 Habit_Q1 Habit_Q2
## Performance_Expectancy_Q1 -0.157601988 -0.119543411 -0.049638141
## Performance_Expectancy_Q2 -0.034020295 0.008513229 -0.041567274
## Performance_Expectancy_Q3 0.168396364 -0.063946886 -0.062092296
## Effort_Expectancy_Q1 -0.123172951 -0.032368235 -0.069296346
## Effort_Expectancy_Q2 0.159325329 0.045845055 -0.320401002
## Effort_Expectancy_Q3 0.010496052 -0.280441660 0.019416487
## Social_Influence_Q1 0.070528691 0.171168676 0.042959621
## Social_Influence_Q2 0.043665555 0.168585778 0.205787116
## Social_Influence_Q3 -0.141672480 0.295149394 0.182867705
## Hedonic_Motivation_Q1 0.005220402 -0.122463637 0.022657142
## Hedonic_Motivation_Q2 -0.084912411 -0.005059843 -0.194198654
## Hedonic_Motivation_Q3 -0.322729979 -0.036607569 0.051751154
## Facilitating_Conditions_Q1 0.241651287 0.130919944 -0.040925013
## Facilitating_Conditions_Q2 -0.018785841 -0.119037293 0.123049189
## Facilitating_Conditions_Q3 1.000000000 -0.056580740 0.118267160
## Habit_Q1 -0.056580740 1.000000000 -0.072447340
## Habit_Q2 0.118267160 -0.072447340 1.000000000
## Habit_Q3 0.284517804 -0.194567387 0.038003294
## Intention_to_Use_Q1 -0.096100493 0.085091304 0.228182870
## Intention_to_Use_Q2 0.043236904 -0.001048310 -0.009471706
## Intention_to_Use_Q3 -0.205515158 0.151873472 0.025741313
## Habit_Q3 Intention_to_Use_Q1 Intention_to_Use_Q2
## Performance_Expectancy_Q1 0.10215900 -0.160741341 0.014616774
## Performance_Expectancy_Q2 -0.05142036 0.208930573 -0.066735784
## Performance_Expectancy_Q3 0.20401508 -0.045445622 -0.039548023
## Effort_Expectancy_Q1 0.05222887 -0.008453050 0.121900669
## Effort_Expectancy_Q2 0.08578905 -0.212382062 -0.306468638
## Effort_Expectancy_Q3 0.04047290 -0.181028914 -0.083387640
## Social_Influence_Q1 0.08830390 -0.238914100 -0.303225735
## Social_Influence_Q2 0.02405355 0.352963408 0.061947913
## Social_Influence_Q3 0.11415030 0.001919460 -0.120743642
## Hedonic_Motivation_Q1 0.27910922 0.126126130 0.281148286
## Hedonic_Motivation_Q2 -0.03746634 -0.016106189 0.174104079
## Hedonic_Motivation_Q3 -0.08090492 0.015825706 -0.034224011
## Facilitating_Conditions_Q1 0.14600546 0.079556630 0.012674994
## Facilitating_Conditions_Q2 -0.03067545 0.075520123 0.003807328
## Facilitating_Conditions_Q3 0.28451780 -0.096100493 0.043236904
## Habit_Q1 -0.19456739 0.085091304 -0.001048310
## Habit_Q2 0.03800329 0.228182870 -0.009471706
## Habit_Q3 1.00000000 -0.111089173 -0.092135842
## Intention_to_Use_Q1 -0.11108917 1.000000000 0.109482636
## Intention_to_Use_Q2 -0.09213584 0.109482636 1.000000000
## Intention_to_Use_Q3 0.20224464 0.005829916 -0.201967721
## Intention_to_Use_Q3
## Performance_Expectancy_Q1 0.177700687
## Performance_Expectancy_Q2 0.123600713
## Performance_Expectancy_Q3 -0.095668921
## Effort_Expectancy_Q1 0.005931588
## Effort_Expectancy_Q2 0.069283474
## Effort_Expectancy_Q3 0.049029034
## Social_Influence_Q1 0.096425208
## Social_Influence_Q2 -0.029138576
## Social_Influence_Q3 0.019754592
## Hedonic_Motivation_Q1 0.198835455
## Hedonic_Motivation_Q2 -0.102613815
## Hedonic_Motivation_Q3 0.147723034
## Facilitating_Conditions_Q1 0.200719480
## Facilitating_Conditions_Q2 0.146850624
## Facilitating_Conditions_Q3 -0.205515158
## Habit_Q1 0.151873472
## Habit_Q2 0.025741313
## Habit_Q3 0.202244644
## Intention_to_Use_Q1 0.005829916
## Intention_to_Use_Q2 -0.201967721
## Intention_to_Use_Q3 1.000000000
# Plot the correlation matrix
corrplot(correlation_matrix, method = "color", type = "upper",
tl.col = "black", tl.srt = 45)
Performance Expectancy (PE): Moderately positively correlated with its own questions (Q1-Q3). Weak negative correlation with Effort Expectancy Q1 and moderate negative correlation with Effort Expectancy Q3. Weak positive correlation with Social Influence Q3 and moderate negative correlation with Hedonic Motivation Q1.
Effort Expectancy (EE): Moderate negative correlation with Performance Expectancy Q2 and weak negative correlation with Performance Expectancy Q3. Weak positive correlation with Social Influence Q1 and moderate positive correlation with Social Influence Q2.
Social Influence (SI): Weak positive correlation with Performance Expectancy Q3 and moderate negative correlation with Effort Expectancy Q1. Moderate positive correlation with Hedonic Motivation Q2 and weak positive correlation with Habit Q1 and Habit Q3.
Hedonic Motivation (HM): Weak positive correlation with Performance Expectancy Q1 and moderate positive correlation with Effort Expectancy Q3. Weak negative correlation with Performance Expectancy Q2 and moderate negative correlation with Social Influence Q2.
Facilitating Conditions (FC), Habit, and Intention to Use: Show mixed correlations with other factors, ranging from weak to moderate. No strong correlations observed.
efa_result <- fa(correlation_matrix, nfactors = 5, rotate = "varimax")
print(efa_result)
## Factor Analysis using method = minres
## Call: fa(r = correlation_matrix, nfactors = 5, rotate = "varimax")
## Standardized loadings (pattern matrix) based upon correlation matrix
## MR2 MR1 MR3 MR4 MR5 h2 u2 com
## Performance_Expectancy_Q1 0.02 -0.12 -0.03 -0.03 0.26 0.083 0.92 1.5
## Performance_Expectancy_Q2 0.05 0.01 0.05 0.57 0.17 0.354 0.65 1.2
## Performance_Expectancy_Q3 0.36 0.08 0.04 -0.07 -0.07 0.147 0.85 1.3
## Effort_Expectancy_Q1 0.16 0.13 -0.16 -0.51 0.14 0.350 0.65 1.7
## Effort_Expectancy_Q2 0.10 -0.41 0.19 0.05 -0.04 0.215 0.79 1.6
## Effort_Expectancy_Q3 0.12 -0.13 -0.08 -0.28 0.03 0.116 0.88 2.0
## Social_Influence_Q1 0.12 -0.15 0.65 0.08 0.00 0.463 0.54 1.2
## Social_Influence_Q2 0.20 0.62 0.08 -0.31 -0.06 0.525 0.47 1.8
## Social_Influence_Q3 0.14 0.30 0.61 0.19 0.19 0.552 0.45 2.1
## Hedonic_Motivation_Q1 0.75 0.20 -0.20 0.16 0.41 0.833 0.17 2.0
## Hedonic_Motivation_Q2 -0.03 -0.08 -0.24 0.06 0.01 0.069 0.93 1.4
## Hedonic_Motivation_Q3 -0.12 0.26 0.07 -0.40 0.31 0.343 0.66 3.0
## Facilitating_Conditions_Q1 0.35 -0.04 -0.07 0.42 0.00 0.307 0.69 2.0
## Facilitating_Conditions_Q2 0.06 0.09 -0.27 -0.08 0.02 0.092 0.91 1.5
## Facilitating_Conditions_Q3 0.47 -0.13 0.01 0.09 -0.77 0.833 0.17 1.8
## Habit_Q1 -0.13 0.20 0.29 0.19 0.01 0.178 0.82 3.1
## Habit_Q2 0.05 0.36 0.09 -0.02 -0.12 0.157 0.84 1.4
## Habit_Q3 0.51 -0.14 0.09 -0.06 0.00 0.292 0.71 1.3
## Intention_to_Use_Q1 -0.06 0.59 -0.19 0.25 -0.02 0.446 0.55 1.6
## Intention_to_Use_Q2 0.04 0.22 -0.42 0.04 -0.03 0.229 0.77 1.6
## Intention_to_Use_Q3 0.14 -0.06 0.10 0.07 0.38 0.187 0.81 1.6
##
## MR2 MR1 MR3 MR4 MR5
## SS loadings 1.48 1.44 1.38 1.30 1.18
## Proportion Var 0.07 0.07 0.07 0.06 0.06
## Cumulative Var 0.07 0.14 0.20 0.27 0.32
## Proportion Explained 0.22 0.21 0.20 0.19 0.17
## Cumulative Proportion 0.22 0.43 0.63 0.83 1.00
##
## Mean item complexity = 1.7
## Test of the hypothesis that 5 factors are sufficient.
##
## df null model = 210 with the objective function = 4.8
## df of the model are 115 and the objective function was 2.13
##
## The root mean square of the residuals (RMSR) is 0.07
## The df corrected root mean square of the residuals is 0.09
##
## Fit based upon off diagonal values = 0.76
## Measures of factor score adequacy
## MR2 MR1 MR3 MR4 MR5
## Correlation of (regression) scores with factors 0.93 0.84 0.85 0.82 0.92
## Multiple R square of scores with factors 0.86 0.71 0.73 0.67 0.84
## Minimum correlation of possible factor scores 0.71 0.41 0.45 0.34 0.69