library(readxl)
mydata <- read_excel("anketa145903-2025-02-04.xlsx")
head(mydata)
## # A tibble: 6 × 18
## Q2a_1 Q2b_1 Q2c_1 Q3a_1 Q3b_1 Q3c_1 Q4a_1 Q4b_1 Q4c_1 Q5a_1 Q5b_1 Q5c_1 Q6a_1
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 6 6 6 5 6 4 5 5 4 5 5 4 7
## 2 7 1 1 7 1 1 7 1 1 7 1 1 7
## 3 7 5 3 7 7 5 6 7 1 7 7 1 7
## 4 7 6 6 6 7 7 7 6 5 7 6 5 6
## 5 7 1 7 7 1 7 7 1 7 7 1 7 7
## 6 7 6 5 7 6 6 7 6 6 7 6 6 7
## # ℹ 5 more variables: Q6b_1 <dbl>, Q6c_1 <dbl>, Q7a_1 <dbl>, Q7b_1 <dbl>,
## # Q7c_1 <dbl>
colnames(mydata) <- c("Secure_Cash", "Secure_Card", "Secure_Mobile Payment", "Speed_Cash", "Speed_Card", "Speed_Mobile Payment", "Ease_Cash", "Ease_Card", "Ease_Mobile Payment", "Convenience_Cash", "Convenience_Card", "Convenience_Mobile Payment", "Privacy_Cash", "Privacy_Card", "Privacy_Mobile Payment", "Tracking_Cash", "Tracking_Card", "Tracking_Mobile Payment")
library(psych)
psych::describe(mydata[ ,-1])
## vars n mean sd median trimmed mad min max range
## Secure_Card 1 110 5.65 1.21 6 5.83 1.48 1 7 6
## Secure_Mobile Payment 2 110 4.68 1.84 5 4.83 1.48 1 7 6
## Speed_Cash 3 110 5.16 1.81 6 5.38 1.48 1 7 6
## Speed_Card 4 110 5.94 1.34 6 6.20 1.48 1 7 6
## Speed_Mobile Payment 5 110 5.31 1.77 6 5.61 1.48 1 7 6
## Ease_Cash 6 110 5.92 1.57 7 6.27 0.00 1 7 6
## Ease_Card 7 110 6.08 1.42 7 6.41 0.00 1 7 6
## Ease_Mobile Payment 8 110 4.89 1.90 5 5.11 1.48 1 7 6
## Convenience_Cash 9 110 4.97 1.90 5 5.15 2.97 1 7 6
## Convenience_Card 10 110 5.87 1.41 6 6.17 1.48 1 7 6
## Convenience_Mobile Payment 11 110 5.01 1.92 6 5.25 1.48 1 7 6
## Privacy_Cash 12 110 5.85 1.62 7 6.18 0.00 1 7 6
## Privacy_Card 13 110 5.00 1.64 5 5.18 1.48 1 7 6
## Privacy_Mobile Payment 14 110 4.40 1.81 5 4.50 1.48 1 7 6
## Tracking_Cash 15 110 5.00 2.04 6 5.20 1.48 1 7 6
## Tracking_Card 16 110 5.27 1.65 6 5.50 1.48 1 7 6
## Tracking_Mobile Payment 17 110 5.05 1.84 6 5.27 1.48 1 7 6
## skew kurtosis se
## Secure_Card -1.62 3.51 0.12
## Secure_Mobile Payment -0.65 -0.84 0.18
## Speed_Cash -0.73 -0.71 0.17
## Speed_Card -1.90 3.89 0.13
## Speed_Mobile Payment -1.20 0.54 0.17
## Ease_Cash -1.71 2.21 0.15
## Ease_Card -2.15 4.50 0.13
## Ease_Mobile Payment -0.70 -0.61 0.18
## Convenience_Cash -0.59 -0.92 0.18
## Convenience_Card -1.86 3.48 0.13
## Convenience_Mobile Payment -0.79 -0.55 0.18
## Privacy_Cash -1.49 1.31 0.15
## Privacy_Card -0.80 -0.11 0.16
## Privacy_Mobile Payment -0.41 -0.85 0.17
## Tracking_Cash -0.54 -1.16 0.19
## Tracking_Card -1.03 0.28 0.16
## Tracking_Mobile Payment -0.77 -0.48 0.18
library(pastecs)
mydata_PCA <- mydata[ , c("Secure_Cash", "Secure_Card", "Secure_Mobile Payment", "Speed_Cash", "Speed_Card", "Speed_Mobile Payment", "Ease_Cash", "Ease_Card", "Ease_Mobile Payment", "Convenience_Cash", "Convenience_Card", "Convenience_Mobile Payment", "Privacy_Cash", "Privacy_Card", "Privacy_Mobile Payment", "Tracking_Cash", "Tracking_Card", "Tracking_Mobile Payment")]
round(stat.desc(mydata_PCA, basic = FALSE), 2)
## Secure_Cash Secure_Card Secure_Mobile Payment Speed_Cash
## median 6.00 6.00 5.00 6.00
## mean 5.60 5.65 4.68 5.16
## SE.mean 0.16 0.12 0.18 0.17
## CI.mean.0.95 0.32 0.23 0.35 0.34
## var 2.92 1.46 3.39 3.29
## std.dev 1.71 1.21 1.84 1.81
## coef.var 0.31 0.21 0.39 0.35
## Speed_Card Speed_Mobile Payment Ease_Cash Ease_Card
## median 6.00 6.00 7.00 7.00
## mean 5.94 5.31 5.92 6.08
## SE.mean 0.13 0.17 0.15 0.13
## CI.mean.0.95 0.25 0.33 0.30 0.27
## var 1.78 3.13 2.48 2.00
## std.dev 1.34 1.77 1.57 1.42
## coef.var 0.23 0.33 0.27 0.23
## Ease_Mobile Payment Convenience_Cash Convenience_Card
## median 5.00 5.00 6.00
## mean 4.89 4.97 5.87
## SE.mean 0.18 0.18 0.13
## CI.mean.0.95 0.36 0.36 0.27
## var 3.62 3.60 2.00
## std.dev 1.90 1.90 1.41
## coef.var 0.39 0.38 0.24
## Convenience_Mobile Payment Privacy_Cash Privacy_Card
## median 6.00 7.00 5.00
## mean 5.01 5.85 5.00
## SE.mean 0.18 0.15 0.16
## CI.mean.0.95 0.36 0.31 0.31
## var 3.70 2.61 2.68
## std.dev 1.92 1.62 1.64
## coef.var 0.38 0.28 0.33
## Privacy_Mobile Payment Tracking_Cash Tracking_Card
## median 5.00 6.00 6.00
## mean 4.40 5.00 5.27
## SE.mean 0.17 0.19 0.16
## CI.mean.0.95 0.34 0.39 0.31
## var 3.27 4.17 2.71
## std.dev 1.81 2.04 1.65
## coef.var 0.41 0.41 0.31
## Tracking_Mobile Payment
## median 6.00
## mean 5.05
## SE.mean 0.18
## CI.mean.0.95 0.35
## var 3.38
## std.dev 1.84
## coef.var 0.36
R <- cor(mydata_PCA)
round(R, 3)
## Secure_Cash Secure_Card Secure_Mobile Payment
## Secure_Cash 1.000 -0.094 -0.172
## Secure_Card -0.094 1.000 0.264
## Secure_Mobile Payment -0.172 0.264 1.000
## Speed_Cash 0.267 -0.208 -0.242
## Speed_Card -0.100 0.413 0.193
## Speed_Mobile Payment -0.071 0.068 0.607
## Ease_Cash 0.540 -0.126 -0.306
## Ease_Card -0.020 0.511 0.200
## Ease_Mobile Payment -0.118 0.187 0.757
## Convenience_Cash 0.576 -0.276 -0.317
## Convenience_Card -0.036 0.500 0.210
## Convenience_Mobile Payment -0.058 0.266 0.690
## Privacy_Cash 0.639 -0.155 -0.285
## Privacy_Card -0.184 0.525 0.219
## Privacy_Mobile Payment -0.185 0.140 0.603
## Tracking_Cash 0.634 -0.227 -0.166
## Tracking_Card -0.026 0.306 0.304
## Tracking_Mobile Payment 0.009 0.020 0.676
## Speed_Cash Speed_Card Speed_Mobile Payment Ease_Cash
## Secure_Cash 0.267 -0.100 -0.071 0.540
## Secure_Card -0.208 0.413 0.068 -0.126
## Secure_Mobile Payment -0.242 0.193 0.607 -0.306
## Speed_Cash 1.000 0.008 -0.096 0.473
## Speed_Card 0.008 1.000 0.334 -0.037
## Speed_Mobile Payment -0.096 0.334 1.000 -0.162
## Ease_Cash 0.473 -0.037 -0.162 1.000
## Ease_Card -0.145 0.721 0.254 0.094
## Ease_Mobile Payment -0.205 0.203 0.729 -0.239
## Convenience_Cash 0.544 -0.077 -0.178 0.579
## Convenience_Card -0.060 0.748 0.309 -0.034
## Convenience_Mobile Payment -0.216 0.293 0.660 -0.157
## Privacy_Cash 0.337 -0.017 -0.063 0.630
## Privacy_Card -0.077 0.545 0.241 -0.025
## Privacy_Mobile Payment -0.129 0.151 0.546 -0.179
## Tracking_Cash 0.357 -0.118 -0.127 0.471
## Tracking_Card -0.116 0.500 0.455 -0.048
## Tracking_Mobile Payment -0.159 0.285 0.759 -0.138
## Ease_Card Ease_Mobile Payment Convenience_Cash
## Secure_Cash -0.020 -0.118 0.576
## Secure_Card 0.511 0.187 -0.276
## Secure_Mobile Payment 0.200 0.757 -0.317
## Speed_Cash -0.145 -0.205 0.544
## Speed_Card 0.721 0.203 -0.077
## Speed_Mobile Payment 0.254 0.729 -0.178
## Ease_Cash 0.094 -0.239 0.579
## Ease_Card 1.000 0.313 -0.163
## Ease_Mobile Payment 0.313 1.000 -0.316
## Convenience_Cash -0.163 -0.316 1.000
## Convenience_Card 0.757 0.264 -0.083
## Convenience_Mobile Payment 0.367 0.805 -0.264
## Privacy_Cash -0.019 -0.179 0.453
## Privacy_Card 0.511 0.298 -0.136
## Privacy_Mobile Payment 0.209 0.701 -0.128
## Tracking_Cash -0.156 -0.161 0.594
## Tracking_Card 0.447 0.396 -0.156
## Tracking_Mobile Payment 0.263 0.704 -0.210
## Convenience_Card Convenience_Mobile Payment
## Secure_Cash -0.036 -0.058
## Secure_Card 0.500 0.266
## Secure_Mobile Payment 0.210 0.690
## Speed_Cash -0.060 -0.216
## Speed_Card 0.748 0.293
## Speed_Mobile Payment 0.309 0.660
## Ease_Cash -0.034 -0.157
## Ease_Card 0.757 0.367
## Ease_Mobile Payment 0.264 0.805
## Convenience_Cash -0.083 -0.264
## Convenience_Card 1.000 0.392
## Convenience_Mobile Payment 0.392 1.000
## Privacy_Cash 0.027 -0.094
## Privacy_Card 0.519 0.359
## Privacy_Mobile Payment 0.207 0.667
## Tracking_Cash -0.060 -0.150
## Tracking_Card 0.479 0.494
## Tracking_Mobile Payment 0.295 0.742
## Privacy_Cash Privacy_Card Privacy_Mobile Payment
## Secure_Cash 0.639 -0.184 -0.185
## Secure_Card -0.155 0.525 0.140
## Secure_Mobile Payment -0.285 0.219 0.603
## Speed_Cash 0.337 -0.077 -0.129
## Speed_Card -0.017 0.545 0.151
## Speed_Mobile Payment -0.063 0.241 0.546
## Ease_Cash 0.630 -0.025 -0.179
## Ease_Card -0.019 0.511 0.209
## Ease_Mobile Payment -0.179 0.298 0.701
## Convenience_Cash 0.453 -0.136 -0.128
## Convenience_Card 0.027 0.519 0.207
## Convenience_Mobile Payment -0.094 0.359 0.667
## Privacy_Cash 1.000 -0.191 -0.286
## Privacy_Card -0.191 1.000 0.521
## Privacy_Mobile Payment -0.286 0.521 1.000
## Tracking_Cash 0.454 -0.148 -0.147
## Tracking_Card -0.070 0.490 0.348
## Tracking_Mobile Payment -0.066 0.198 0.552
## Tracking_Cash Tracking_Card Tracking_Mobile Payment
## Secure_Cash 0.634 -0.026 0.009
## Secure_Card -0.227 0.306 0.020
## Secure_Mobile Payment -0.166 0.304 0.676
## Speed_Cash 0.357 -0.116 -0.159
## Speed_Card -0.118 0.500 0.285
## Speed_Mobile Payment -0.127 0.455 0.759
## Ease_Cash 0.471 -0.048 -0.138
## Ease_Card -0.156 0.447 0.263
## Ease_Mobile Payment -0.161 0.396 0.704
## Convenience_Cash 0.594 -0.156 -0.210
## Convenience_Card -0.060 0.479 0.295
## Convenience_Mobile Payment -0.150 0.494 0.742
## Privacy_Cash 0.454 -0.070 -0.066
## Privacy_Card -0.148 0.490 0.198
## Privacy_Mobile Payment -0.147 0.348 0.552
## Tracking_Cash 1.000 0.011 -0.059
## Tracking_Card 0.011 1.000 0.495
## Tracking_Mobile Payment -0.059 0.495 1.000
library(tibble)
library(tidyr)
##
## Attaching package: 'tidyr'
## The following object is masked from 'package:pastecs':
##
## extract
mydata_PCA <- mydata %>%
pivot_longer(everything(), names_to = "name", values_to = "score") %>%
separate(name, into = c("retailer", "dimension"), sep = "_")%>%
pivot_wider(names_from = dimension, values_from = score, values_fn = mean) %>%
column_to_rownames(var = "retailer")
print(mydata_PCA)
## Cash Card Mobile Payment
## Secure 5.600000 5.654545 4.681818
## Speed 5.163636 5.936364 5.309091
## Ease 5.918182 6.081818 4.890909
## Convenience 4.972727 5.872727 5.009091
## Privacy 5.845455 5.000000 4.400000
## Tracking 5.000000 5.272727 5.045455
library(psych)
cortest.bartlett(R, n = nrow(mydata))
## $chisq
## [1] 1321.697
##
## $p.value
## [1] 4.295964e-185
##
## $df
## [1] 153
det(R)
## [1] 2.408085e-06
library(psych)
KMO(R)
## Kaiser-Meyer-Olkin factor adequacy
## Call: KMO(r = R)
## Overall MSA = 0.8
## MSA for each item =
## Secure_Cash Secure_Card
## 0.74 0.71
## Secure_Mobile Payment Speed_Cash
## 0.85 0.80
## Speed_Card Speed_Mobile Payment
## 0.77 0.87
## Ease_Cash Ease_Card
## 0.70 0.72
## Ease_Mobile Payment Convenience_Cash
## 0.84 0.79
## Convenience_Card Convenience_Mobile Payment
## 0.82 0.90
## Privacy_Cash Privacy_Card
## 0.75 0.75
## Privacy_Mobile Payment Tracking_Cash
## 0.80 0.80
## Tracking_Card Tracking_Mobile Payment
## 0.90 0.84
library(FactoMineR)
## Warning: package 'FactoMineR' was built under R version 4.4.2
components <- PCA(mydata_PCA,
scale.unit = TRUE,
graph = FALSE)
library(factoextra)
## Warning: package 'factoextra' was built under R version 4.4.2
## Loading required package: ggplot2
##
## Attaching package: 'ggplot2'
## The following objects are masked from 'package:psych':
##
## %+%, alpha
## Welcome! Want to learn more? See two factoextra-related books at https://goo.gl/ve3WBa
get_eigenvalue(components)
## eigenvalue variance.percent cumulative.variance.percent
## Dim.1 1.9755776 65.852588 65.85259
## Dim.2 0.9162853 30.542843 96.39543
## Dim.3 0.1081371 3.604568 100.00000
library(factoextra)
fviz_eig(components,
choice = "eigenvalue",
main = "Scree plot",
ylab = "Eigenvalue",
addlabels = TRUE)
library(psych)
fa.parallel(mydata_PCA,
sim = FALSE,
fa = "pc")
## Warning in fa.stats(r = r, f = f, phi = phi, n.obs = n.obs, np.obs = np.obs, :
## The estimated weights for the factor scores are probably incorrect. Try a
## different factor score estimation method.
## Warning in fac(r = r, nfactors = nfactors, n.obs = n.obs, rotate = rotate, : An
## ultra-Heywood case was detected. Examine the results carefully
## Parallel analysis suggests that the number of factors = NA and the number of components = 0
library(FactoMineR)
components <- PCA(mydata_PCA,
scale.unit = TRUE,
graph = FALSE,
ncp = 2)
components
## **Results for the Principal Component Analysis (PCA)**
## The analysis was performed on 6 individuals, described by 3 variables
## *The results are available in the following objects:
##
## name description
## 1 "$eig" "eigenvalues"
## 2 "$var" "results for the variables"
## 3 "$var$coord" "coord. for the variables"
## 4 "$var$cor" "correlations variables - dimensions"
## 5 "$var$cos2" "cos2 for the variables"
## 6 "$var$contrib" "contributions of the variables"
## 7 "$ind" "results for the individuals"
## 8 "$ind$coord" "coord. for the individuals"
## 9 "$ind$cos2" "cos2 for the individuals"
## 10 "$ind$contrib" "contributions of the individuals"
## 11 "$call" "summary statistics"
## 12 "$call$centre" "mean of the variables"
## 13 "$call$ecart.type" "standard error of the variables"
## 14 "$call$row.w" "weights for the individuals"
## 15 "$call$col.w" "weights for the variables"
print(components$var$cor)
## Dim.1 Dim.2
## Cash -0.7586862 0.62793233
## Card 0.6757229 0.72238526
## Mobile Payment 0.9712732 -0.01207556
print(components$var$contrib)
## Dim.1 Dim.2
## Cash 29.13602 43.03234050
## Card 23.11230 56.95174533
## Mobile Payment 47.75168 0.01591417
library(factoextra)
fviz_pca_biplot(components)
## Conclusion
The Principal Component Analysis was conducted to identify the underlying structure in consumer perceptions of different payment methods, considering factors such as security, speed, ease of use, convenience, privacy, and tracking for cash, card, and mobile payments. The analysis aimed to determine whether meaningful dimensions could be extracted from the data.
The Bartlett’s test of sphericity was statistically significant (p<0.001), indicating that the correlation matrix was appropriate for factor analysis. Additionally, the Kaiser-Meyer-Olkin (KMO) measure of sampling adequacy was 0.8, confirming that the data was well-suited for PCA. Based on the eigenvalues and the scree plot, two principal components (PCs) were retained, explaining a cumulative 96.4% of the total variance.
The first component (PC1: Cash vs. Digital Payments) explained 65.9% of the variance and primarily distinguished between mobile payments and cash transactions. Mobile payments had the strongest contribution to this component, suggesting that respondents perceive them as fundamentally different from cash in terms of security, convenience, and traceability.
The second component (PC2: Differentiation of Card Payments) accounted for 30.5% of the variance and highlighted the role of card payments as an intermediate option between cash and mobile transactions. This suggests that while card payments share some similarities with digital transactions, they are still viewed separately in key aspects such as privacy and security.
Looking at variable contributions, mobile payments had the highest influence on PC1 (47.75%), reinforcing the idea that digital transactions stand out as a distinct category. Cash payments, on the other hand, contributed strongly but negatively to PC1, suggesting a clear contrast between traditional and digital methods. Card payments were more evenly distributed across both components, indicating that they are perceived as a hybrid form of payment.