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

Loading the Data

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>, …

1) Which questions are more correlated with their corresponding factors.

most_correlated_results <- list()
question_columns <- colnames(survey_data)[grepl("^Q[1-3]$", colnames(survey_data))]

for (factor in unique(sub("_Q[1-3]$", "", question_columns))) {
  # Extract columns for the current factor
  factor_columns <- grep(paste0("^", factor), question_columns, value = TRUE)
  
  # Calculate correlations
  correlations <- cor(survey_data[, factor_columns])
  
  # Find most correlated question
  most_correlated_question <- names(which.max(correlations[1, -1]))
  most_correlation_coefficient <- correlations[1, which.max(correlations[1, -1])]
  
  # Store results in the list
  most_correlated_results[[factor]] <- list(
    factor = factor,
    most_correlated_question = most_correlated_question,
    most_correlation_coefficient = most_correlation_coefficient
  )
}

# Display the results
for (factor in names(most_correlated_results)) {
  cat(paste("Factor:", most_correlated_results[[factor]]$factor, "\n"))
  cat(paste("Most correlated question:", most_correlated_results[[factor]]$most_correlated_question, "\n"))
  cat(paste("Correlation coefficient:", most_correlated_results[[factor]]$most_correlation_coefficient, "\n\n"))
}

2) Which questions are least correlated with their corresponding factors.

# Define a function to find the least correlated questions
find_least_correlated <- function(factor_name, survey_data) {
  # Extract columns for the current factor
  factor_columns <- grep(factor_name, colnames(survey_data))
  
  # Calculate correlations
  correlations <- cor(survey_data[, factor_columns])
  
  # Find the absolute minimum correlation coefficient
  min_correlation <- min(abs(correlations[1, -1]))
  
  # Find the questions with the absolute minimum correlation coefficient
  least_correlated_questions <- names(which(abs(correlations[1, -1]) == min_correlation))
  
  return(list(least_correlated_questions = least_correlated_questions, 
              min_correlation = min_correlation))
}

# List to store results
least_correlated_results <- list()

# Loop through factors
for (factor in c("Performance_Expectancy", "Effort_Expectancy", "Social_Influence", 
                 "Hedonic_Motivation", "Facilitating_Conditions", "Habit", "Intention_to_Use")) {
  # Find least correlated questions for the current factor
  result <- find_least_correlated(factor, survey_data)
  
  # Store results in the list
  least_correlated_results[[factor]] <- result
}

# Display the results
for (factor in names(least_correlated_results)) {
  cat(paste("Factor:", factor, "\n"))
  cat(paste("Least correlated questions:", 
            paste(least_correlated_results[[factor]]$least_correlated_questions, collapse = ", "), "\n"))
  cat(paste("Correlation coefficient:", 
            least_correlated_results[[factor]]$min_correlation, "\n\n"))
}
## Factor: Performance_Expectancy 
## Least correlated questions: Performance_Expectancy_Q2 
## Correlation coefficient: 0.00664064447601978 
## 
## Factor: Effort_Expectancy 
## Least correlated questions: Effort_Expectancy_Q2 
## Correlation coefficient: 0.0424217838115047 
## 
## Factor: Social_Influence 
## Least correlated questions: Social_Influence_Q2 
## Correlation coefficient: 0.0351211656507674 
## 
## Factor: Hedonic_Motivation 
## Least correlated questions: Hedonic_Motivation_Q3 
## Correlation coefficient: 0.0138549890064513 
## 
## Factor: Facilitating_Conditions 
## Least correlated questions: Facilitating_Conditions_Q2 
## Correlation coefficient: 0.0797219865715522 
## 
## Factor: Habit 
## Least correlated questions: Habit_Q2 
## Correlation coefficient: 0.0724473402523719 
## 
## Factor: Intention_to_Use 
## Least correlated questions: Intention_to_Use_Q3 
## Correlation coefficient: 0.00582991555752354

3) Finding the correlation matrix of the 7 factors for 3 questions with respeective each factor.

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

4) Plotting the correlation matrix/

# Plot the correlation matrix
corrplot(correlation_matrix, method = "color", type = "upper", 
         tl.col = "black", tl.srt = 45)

Summary:

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.