1 Introduction

Good morning Professors,

We’re excited to present the work we’ve done so far—our beautifully crafted document! The project has been incredibly engaging, though R Studio has definitely been a worthy opponent. But fear not, we’re not giving up! We’ve cleaned up our questionnaire, manipulated the data, and even dared to explore some potential clustering. While we still have a few lingering questions, we’re hopeful that our exhausted faces will earn your understanding. We look forward to our consultations and can’t wait to dive deeper into this journey!

Sincerely,

The Payvolutionaries

library(readr)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
# Load the CSV file
NLB_data <- read.csv("~/Desktop/NLB/nlb_data.csv", sep = ";")

# Remove columns 2 to 8
NLB_data <- NLB_data %>% select(-c(2:8, 101:116))

# Display the first few rows of the modified dataset
head(NLB_data)
##   status                  Q1      Q3a
## 1 Status Koliko ste stari?   Gotovina
## 2      6                   7        3
## 3      6                   9        2
## 4      6                   9        2
## 5      6                   7        3
## 6      6                   7        2
##                                                                Q3b
## 1 Plačilo z debetno ali kreditno kartico (uporaba fizične kartice)
## 2                                                                2
## 3                                                                5
## 4                                                                4
## 5                                                                5
## 6                                                                5
##                   Q3c                       Q3d           Q4a               Q4b
## 1 Plačilo s telefonom Drugo (PayPal, Stripe,..) Nakupi do 10€ Nakupi med 11-99€
## 2                   5                         2             4                 3
## 3                   1                         1             2                 1
## 4                   4                         1             2                 2
## 5                   5                         1             2                 2
## 6                   5                         1             2                 1
##                    Q4c              Q4d
## 1 Nakupi med 100-1000€ Nakupi nad 1000€
## 2                    2                1
## 3                    1                1
## 4                    1                1
## 5                    1                1
## 6                    1                1
##                                                                         Q5
## 1 Kako se običajno odzovete, če prodajalec ne sprejema digitalnih plačil? 
## 2                                                                        2
## 3                                                                        1
## 4                                                                        2
## 5                                                                        1
## 6                                                                        1
##                  Q5_4_text                                     Q6a
## 1 Drugo (prosim navedite): Plača ali zaslužek iz študentskega dela
## 2                       -2                                       3
## 3                       -2                                       4
## 4                       -2                                       3
## 5                       -2                                       3
## 6                       -2                                       4
##                              Q6b                                       Q6c
## 1 Žepnina (od družinskih članov) Darila (ob rojstnih dnevih, praznikih...)
## 2                              2                                         1
## 3                              2                                         1
## 4                              3                                         1
## 5                              3                                         2
## 6                              3                                         3
##                                                                Q6d
## 1 Delo na črno ali priložnostno delo (varstvo otrok, tutorstvo...)
## 2                                                                1
## 3                                                                4
## 4                                                                4
## 5                                                                4
## 6                                                                4
##                              Q6e
## 1 Državne in/ali socialne pomoči
## 2                              3
## 3                              4
## 4                              4
## 5                              4
## 6                              4
##                                                         Q6f
## 1 Državne in druge oblike štipendij (Zoisova, kadrovska...)
## 2                                                         3
## 3                                                         4
## 4                                                         4
## 5                                                         3
## 6                                                         4
##                                                  Q6g
## 1 Donosi iz naložb (delnice, obveznice, kripto itd.)
## 2                                                  3
## 3                                                  3
## 4                                                  2
## 5                                                  4
## 6                                                  4
##                                                                                                                                                                     Q7
## 1 Ali vi varčujete denar? (Vprašanje NE  zajema morebitnih privarčevanih sredstev, ki so jih za vas varčevali oziroma jih varčujejo starši ali drugi družinski člani) 
## 2                                                                                                                                                                    1
## 3                                                                                                                                                                    1
## 4                                                                                                                                                                    1
## 5                                                                                                                                                                    1
## 6                                                                                                                                                                    2
##   Q8a
## 1  NA
## 2   5
## 3   7
## 4   7
## 5   7
## 6  -2
##                                                                                                                                                                       Q9a
## 1 Običajno denar porabim v obliki, v kateri sem ga prejel_a (ne spreminjam oblike prejetega denarja npr. polaganje gotovine na banko ali dvigovanje denarja iz  kartice).
## 2                                                                                                                                                                       6
## 3                                                                                                                                                                       7
## 4                                                                                                                                                                       6
## 5                                                                                                                                                                       6
## 6                                                                                                                                                                       7
##                                                                                                                                                           Q9b
## 1 Zaradi varnosti svojih osebnih podatkov se počutim zaskrbljenega_o, ko uporabljam digitalne načine plačevanja (npr. spletno bančništvo, mobilne denarnice).
## 2                                                                                                                                                           3
## 3                                                                                                                                                           6
## 4                                                                                                                                                           2
## 5                                                                                                                                                           5
## 6                                                                                                                                                           4
##                                                                      Q9c
## 1 Digitalno plačevanje se mi zdi manj varno kakor gotovinsko plačevanje.
## 2                                                                      5
## 3                                                                      3
## 4                                                                      3
## 5                                                                      6
## 6                                                                      7
##                                                                                                                                     Q9d
## 1 Več zaupanja imam v digitalne načine plačevanja, če ponujajo funkcije, kot so dvofaktorska avtentikacija ali biometrična preverjanja.
## 2                                                                                                                                     6
## 3                                                                                                                                     6
## 4                                                                                                                                     6
## 5                                                                                                                                     7
## 6                                                                                                                                     4
##                                            Q9e
## 1 Počutim se varno, ko s seboj nosim gotovino.
## 2                                            4
## 3                                            3
## 4                                            3
## 5                                            4
## 6                                            4
##                                                                          Q9f
## 1 Raje uporabljam digitalna plačila, ker so bolj priročna in prihranijo čas.
## 2                                                                          7
## 3                                                                          7
## 4                                                                          7
## 5                                                                          7
## 6                                                                          7
##                                                                                                                                                        Q9g
## 1 Raje uporabljam gotovino, da bi se izognil_a pretirani porabi, (ob porabljanju gotovine se bolj zavedam svojega zapravljanja in je le-to bolj zavestno).
## 2                                                                                                                                                        6
## 3                                                                                                                                                        1
## 4                                                                                                                                                        1
## 5                                                                                                                                                        1
## 6                                                                                                                                                        4
##                                                                                                                                           Q9h
## 1 Gotovino najpogosteje uporabim tam, kjer digitalna plačila niso mogoča, v nasprotnem primeru pa se raje poslužujem digitalnega plačevanja. 
## 2                                                                                                                                           7
## 3                                                                                                                                           6
## 4                                                                                                                                           7
## 5                                                                                                                                           7
## 6                                                                                                                                           7
##                Q31_2a              Q31_2b                      Q31_2c
## 1 Enostavnost uporabe Hitrost transakcije Možnost uporabe v trgovinah
## 2                   7                   7                           6
## 3                   6                   7                           5
## 4                   7                   6                           6
## 5                   7                   7                           7
## 6                   7                   7                           7
##                        Q31_2d                                        Q31_2e
## 1 Varnost plačilnega sredstva Funkcije za sledenje in načrtovanje proračuna
## 2                           6                                             3
## 3                           7                                             7
## 4                           6                                             4
## 5                           7                                             7
## 6                           7                                             7
##               Q31_2f     Q10a                      Q10b
## 1 Zasebnost uporabe  Gotovina (Fizična) Debetna kartica
## 2                  6        6                         6
## 3                  6        3                         7
## 4                  5        6                         6
## 5                  7        6                         5
## 6                  7        7                         4
##                         Q10c                                        Q10d
## 1 (Fizična) kreditna kartica Plačevanje s telefonom (Flik, Apple pay...)
## 2                          6                                           7
## 3                          7                                           3
## 4                          4                                           6
## 5                          4                                           6
## 6                          4                                           4
##                         Q10e     Q11a                      Q11b
## 1 Neobanke (Revolut, N26...) Gotovina (Fizična) debetna kartica
## 2                          6        5                         6
## 3                          6        7                         7
## 4                          6        4                         7
## 5                          6        3                         6
## 6                          4        7                         7
##                         Q11c                   Q11d                       Q11e
## 1 (Fizična) kreditna kartica Plačevanje s telefonom Neobanke (Revolut, N26...)
## 2                          6                      7                          6
## 3                          7                      6                          6
## 4                          7                      7                          7
## 5                          6                      7                          7
## 6                          7                      7                          7
##       Q12a                      Q12b                       Q12c
## 1 Gotovina (Fizična) debetna kartica (Fizična) kreditna kartica
## 2        6                         7                          7
## 3        6                         6                          6
## 4        7                         7                          7
## 5        6                         7                          7
## 6        7                         7                          7
##                     Q12d                       Q12e     Q13a
## 1 Plačevanje s telefonom Neobanke (Revolut, N26...) Gotovina
## 2                      7                          6        5
## 3                      6                          6        5
## 4                      7                          7        4
## 5                      6                          6        1
## 6                      7                          4        7
##                        Q13b                       Q13c                   Q13d
## 1 (Fizična) debetna kartica (Fizična) kreditna kartica Plačevanje s telefonom
## 2                         6                          6                      7
## 3                         7                          7                      7
## 4                         7                          7                      7
## 5                         6                          6                      7
## 6                         7                          7                      7
##                         Q13e     Q14a                      Q14b
## 1 Neobanke (Revolut, N26...) Gotovina (Fizična) debetna kartica
## 2                          7        7                         6
## 3                          7        7                         1
## 4                          7        6                         5
## 5                          7        7                         4
## 6                          7        4                         7
##                         Q14c                   Q14d                       Q14e
## 1 (Fizična) kreditna kartica Plačevanje s telefonom Neobanke (Revolut, N26...)
## 2                          5                      5                          6
## 3                          1                      1                          1
## 4                          5                      5                          5
## 5                          4                      4                          4
## 6                          7                      7                          7
##       Q15a                      Q15b                       Q15c
## 1 Gotovina (Fizična) debetna kartica (Fizična) kreditna kartica
## 2        7                         5                          5
## 3        2                         7                          4
## 4        5                         7                          7
## 5        6                         5                          1
## 6        4                         7                          7
##                     Q15d                       Q15e
## 1 Plačevanje s telefonom Neobanke (Revolut, N26...)
## 2                      3                          3
## 3                      1                          6
## 4                      7                          7
## 5                      5                          5
## 6                      7                          7
##                                                           Q16a
## 1 Izbiram načine plačevanja, kot jih izbirajo moji prijatelji.
## 2                                                            5
## 3                                                            4
## 4                                                            4
## 5                                                            7
## 6                                                            4
##                                                                Q16b
## 1 Izbiram načine plačevanja, kot jih izbirajo moji družinski člani.
## 2                                                                 2
## 3                                                                 4
## 4                                                                 4
## 5                                                                 7
## 6                                                                 4
##                                                    Q17               Q17_5_text
## 1 Kako si najpogosteje delite stroške med prijatelji?  Drugo (prosim navedite):
## 2                                                    2                       -2
## 3                                                    2                       -2
## 4                                                    2                       -2
## 5                                                    2                       -2
## 6                                                    2                       -2
##                        Q18a                                Q18b
## 1 Lahko nakažem točno vsoto Da se izognem plačevanju z gotovino
## 2                         1                                   0
## 3                         1                                   1
## 4                         1                                   1
## 5                         1                                   1
## 6                         1                                   1
##                              Q18c
## 1 Ker je proces hiter in priročen
## 2                               1
## 3                               1
## 4                               1
## 5                               1
## 6                               1
##                                                                      Q18d
## 1 Ker imam zabeležene svoje transakcije in tako lažje vodim svoje finance
## 2                                                                       0
## 3                                                                       0
## 4                                                                       1
## 5                                                                       1
## 6                                                                       1
##                       Q18e                Q18e_text
## 1 Drugo (prosim navedite): Drugo (prosim navedite):
## 2                        0                       -2
## 3                        0                       -2
## 4                        0                       -2
## 5                        0                       -2
## 6                        0                       -2
##                             Q19a                       Q19b             Q19c
## 1 Goljufije (npr. kraja denarja) Razkritje osebnih podatkov Kraja identitete
## 2                              3                          5                3
## 3                              5                          5                6
## 4                              3                          3                3
## 5                              5                          5                5
## 6                              7                          7                7
##                                      Q19d
## 1 Izguba dostopa zaradi hekerskega napada
## 2                                       3
## 3                                       7
## 4                                       3
## 5                                       6
## 6                                       7
##                                                                     Q20
## 1 Ali ste bili vi (oz. kdo od vaših bližnjih) žrtev spletne goljufije? 
## 2                                                                     2
## 3                                                                     3
## 4                                                                     4
## 5                                                                     4
## 6                                                                     1
##                                                                                      Q21a
## 1 Pogosteje uporabljam gotovino v neznanih ali sumljivih situacijah (npr. med potovanji).
## 2                                                                                       0
## 3                                                                                       0
## 4                                                                                      -2
## 5                                                                                      -2
## 6                                                                                      -1
##                                                                                                                                                                            Q21b
## 1 Pogosteje uporabljam digitalna plačilna sredstva, kot so virtualne ali enkratne kartice, ki jih omogočajo neobanke, v neznanih ali sumljivih situacijah (npr. med potovanji).
## 2                                                                                                                                                                             0
## 3                                                                                                                                                                             0
## 4                                                                                                                                                                            -2
## 5                                                                                                                                                                            -2
## 6                                                                                                                                                                            -1
##                                                   Q21c
## 1 Postal_a sem bolj previden_na pri spletnih plačilih.
## 2                                                    1
## 3                                                    1
## 4                                                   -2
## 5                                                   -2
## 6                                                   -1
##                                                                                       Q21d
## 1 Preklopil_a sem na varnejše plačilne možnosti (npr. mobilne denarnice z avtentikacijo). 
## 2                                                                                        0
## 3                                                                                        0
## 4                                                                                       -2
## 5                                                                                       -2
## 6                                                                                       -1
##                              Q21e
## 1 Moje vedenje se ni spremenilo. 
## 2                               0
## 3                               0
## 4                              -2
## 5                              -2
## 6                              -1
##                                                                       Q22
## 1 Če bi imeli možnost, ali bi popolnoma preklopili na digitalna plačila? 
## 2                                                                       2
## 3                                                                       2
## 4                                                                       2
## 5                                                                       1
## 6                                                                       1
##                    Q23
## 1 Katerega spola ste? 
## 2                    1
## 3                    2
## 4                    2
## 5                    2
## 6                    2
##                                                             Q24
## 1 Katera je vaša najvišja dosežena stopnja dosežene izobrazbe? 
## 2                                                             6
## 3                                                             5
## 4                                                             4
## 5                                                             4
## 6                                                             4
##                               Q25 Q25_5_text
## 1 Kakšen je vaš trenutni status?      Drugo:
## 2                               1         -2
## 3                               1         -2
## 4                               1         -2
## 5                               1         -2
## 6                               1         -2
##                                                          Q26
## 1 Kakšna je višina vaših trenutnih neto mesečnih prihodkov? 
## 2                                                          2
## 3                                                          2
## 4                                                          3
## 5                                                          2
## 6                                                          4
##                                                      Q27
## 1 Katero banko trenutno uporabljate kot primarno banko? 
## 2                                                      2
## 3                                                      2
## 4                                                      7
## 5                                                      1
## 6                                                      1
##                 Q27_7_text
## 1 Drugo (prosim navedite):
## 2                       -2
## 3                       -2
## 4                Unicredit
## 5                       -2
## 6                       -2

2 Dataset overview

  • Unit of observation: Each row represents a single respondent from the questionnaire, which was completed by young people aged 18 to 27.
  • Sample size: The dataset includes responses from a total of 441 young individuals.

2.1 Variables description

Q1a - Age

Q3 - How many times a month do you use the following payment methods on average?

  • Q3a - Cash
  • Q3b - Debit or Credit (physical) cards
  • Q3c - Phone
  • Q3d - Other (PayPal, Stripe..)

Q4 - How often do you use cash payment for the following purchases?

  • Q4a - Purchases up to €10
  • Q4b - Purchases between €11 and €99
  • Q4c - Purchases between €100 and €1000
  • Q4d - Purchases over €1000

Q5 - How do you usually respond if a merchant does not accept digital payments?

  • Q5a - I prefer to go elsewhere and pay with a digital payment method.
  • Q5b - I pay in the form available, even if it means withdrawing cash from an ATM.
  • Q5c - I have not encountered such a situation yet.
  • Q5d - Other (please specify).

Q6 - Which of the following income sources do you have, and how do you receive them?

  • Q6a - Salary or earnings from student work
  • Q6b - Pocket Money (from family members)
  • Q6c - Gifts (for birthdays, holidays, etc.)
  • Q6d - Unreported or occasional work (childcare, tutoring, etc.)
  • Q6e - Government and/or social benefits
  • Q6f - Government and other forms of scholarships (e.g., Zois, corporate)
  • Q6g - Returns from investments (stocks, bonds, cryptocurrencies, etc.)

Q7 - Do you save money? (This question does NOT include savings from parents or family members.)

  • Q7a - Yes
  • Q7b - No

Q8a - In what form do you save money? (Digital vs. cash savings)

Q9 - Various attitudes towards digital and cash payments.

  • Q9a - I usually spend money in the form in which I received it.
  • Q9b - I feel concerned about the security of my personal information when using digital payment methods.
  • Q9c - I find digital payments less secure than cash payments.
  • Q9d - I have more confidence in digital payment methods if they offer features like two-factor authentication.
  • Q9e - I feel safe when I carry cash with me.
  • Q9f - I prefer to use digital payments because they are more convenient and save time.
  • Q9g - I prefer to use cash to avoid overspending.
  • Q9h - I use cash only when digital payments are not possible.

Q10 - How safe do you think the following payment methods are?

  • Q10a - Cash
  • Q10b - (Physical) Debit Card
  • Q10c - (Physical) Credit Card
  • Q10d - Paying with your phone (Flik, Apple Pay…)
  • Q10e - Neobanks (Revolut, N26…)

Q11 - How easy do you find the following payment methods to use?

  • Q11a - Cash
  • Q11b - (Physical) Debit Card
  • Q11c - (Physical) Credit Card
  • Q11d - Paying with your phone (Flik, Apple Pay…)
  • Q11e - Neobanks (Revolut, N26…)

Q12 - How accepted do you think the following payment methods are in stores in your environment?

  • Q12a - Cash
  • Q12b - (Physical) Debit Card
  • Q12c - (Physical) Credit Card
  • Q12d - Paying with your phone (Flik, Apple Pay…)
  • Q12e - Neobanks (Revolut, N26…)

Q13 - What do you consider the fastest payment method?

  • Q13a - Cash
  • Q13b - (Physical) Debit Card
  • Q13c - (Physical) Credit Card
  • Q13d - Paying with your phone (Flik, Apple Pay…)
  • Q13e - Neobanks (Revolut, N26…)

Q14 - Which payment method do you consider the most private?

  • Q14a - Cash
  • Q14b - (Physical) Debit Card
  • Q14c - (Physical) Credit Card
  • Q14d - Paying with your phone (Flik, Apple Pay…)
  • Q14e - Neobanks (Revolut, N26…)

Q15 - Which payment method helps you control spending the most?

  • Q15a - Cash
  • Q15b - (Physical) Debit Card
  • Q15c - (Physical) Credit Card
  • Q15d - Paying with your phone (Flik, Apple Pay…)
  • Q15e - Neobanks (Revolut, N26…)

Q16 - Social influence on payment method choice.

  • Q16a - I choose the payment methods my friends choose.
  • Q16b - I choose the payment methods my family members choose.

Q17 - How do you most often share expenses among friends?

  • Q17a - With cash
  • Q17b - Through mobile applications (Flik, Revolut, PayPal…)
  • Q17c - By bank transfer
  • Q17d - I don’t share expenses among friends
  • Q17e - Other (please specify)

Q18 - Reasons for preferring digital payments.

  • Q18a - I can quote the exact sum.
  • Q18b - To avoid paying with cash.
  • Q18c - Because the process is quick and convenient.
  • Q18d - Because I have my transactions recorded and it is easier to manage finances.
  • Q18e - Other (please specify).

Q19 - Concerns about digital payment security.

  • Q19a - Fraud (e.g., stealing money)
  • Q19b - Disclosure of Personal Information
  • Q19c - Identity theft
  • Q19d - Loss of access due to a hacker attack

Q20 - Experience with online fraud.

  • Q20a - Yes, it happened to me.
  • Q20b - Yes, I know people who have had this happen.
  • Q20c - Yes, it has happened to me and others I know.
  • Q20d - I’ve never encountered such a situation.

Q21 - How did this affect your behavior in further payment habits?

  • Q21a - I use cash more often in unfamiliar or suspicious situations (e.g., when traveling).
  • Q21b - I use digital payment methods (e.g., virtual or disposable cards facilitated by neobanks) more often in unfamiliar or suspicious situations.
  • Q21c - I am more cautious with online payments.
  • Q21d - I switched to more secure payment options (e.g., mobile wallets with authentication).
  • Q21e - My behavior hasn’t changed.

Q22 - If we had the opportunity, would you switch to digital payments entirely?

  • Q22a - Yes, immediately.
  • Q22b - I would consider it, but I wouldn’t want to give up cash completely.
  • Q22c - No, I prefer to use cash.
  • Q22d - I don’t know.

Q23 - What is your gender?

  • Q23a - Man.
  • Q23b - Woman.
  • Q23c - Another.
  • Q23d - I don’t want to answer.

Q24 - What is your highest level of educational attainment?

  • Q24a - Unfinished primary school.
  • Q24b - Completed primary school.
  • Q24c - Completed lower or secondary vocational education.
  • Q24d - Completed secondary professional or general education.
  • Q24e - Completed tertiary professional or tertiary professional education (including 1st Bologna level).

Q25 - What is your current status?

  • Q25a - Student.
  • Q25b - Employed.
  • Q25c - Self-employed.
  • Q25d - Unemployed.
  • Q25e - Other (please specify).

Q26 - What is your current net monthly income?

  • Q26a - 0-200 EUR.
  • Q26b - 201-500 EUR.
  • Q26c - 501-800 EUR.
  • Q26d - 801-1300 EUR.
  • Q26e - More than 1300 EUR.

Q27 - Which bank do you currently use as your primary bank?

  • Q27a - NLB.
  • Q27b - OTP.
  • Q27c - Intesa Sanpaolo.
  • Q27d - Sparkasse.
  • Q27e - Addiko Bank.
  • Q27f - Workers’ Savings Bank.
  • Q27g - Other (please specify).

2.2 Data manipulation

#Remove first row
NLB_data <- NLB_data[-1, ]

#Remove all questionnaires with non valid status
library(dplyr)

NLB_data <- NLB_data %>%
  filter(!status == 5)

#Remove status column
NLB_data <- NLB_data[ , -1]

#Remove all under 18/over 27
library(dplyr)

NLB_data <- NLB_data %>%
 filter(!Q1 %in% c(1, 12))
# Factoring

# Age (Q1)
NLB_data$Q1 <- factor(NLB_data$Q1,
                       levels = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 11),
                       labels = c(18, 19, 20, 21, 22, 23, 24, 25, 26, 27))

# Q5
NLB_data$Q5 <- factor(NLB_data$Q5,
                       levels = c(1, 2, 3, 4),
                       labels = c("Pay digital elsewhere", "Pay as available", "Never occurred", "Other"))

# Q7

NLB_data$Q7 <- factor(NLB_data$Q7,
                       levels = c(1, 2),
                       labels = c("Yes", "No"))


# Q17

NLB_data$Q17 <- factor(NLB_data$Q17,
                       levels = c(1, 2, 3, 4, 5),
                       labels = c("Cash", "Mobile apps", "Bank transfer", "Don't share", "Other"))

# Q20

NLB_data$Q20 <- factor(NLB_data$Q20,
                       levels = c(1, 2, 3, 4),
                       labels = c("Yes - me", "Yes - others", "Yes - both", "No"))


# Q22

NLB_data$Q22 <- factor(NLB_data$Q22,
                       levels = c(1, 2, 3, 4),
                       labels = c("Fully digital", "Balance digital-cash", "Cash", "Don't know"))

# Q23

NLB_data$Q23 <- factor(NLB_data$Q23,
                       levels = c(1, 2, 3, 4),
                       labels = c("Man", "Woman", "Other", "Don't want to answer"))

# Q24

NLB_data$Q24 <- factor(NLB_data$Q24,
                       levels = c(1, 2, 3, 4, 5, 6, 7),
                       labels = c("Unfinished primary", "Primary school", "Vocational education", "High School", "Bachelor Degree", "Master Degree", "PhD" ))

# Q25

NLB_data$Q25 <- factor(NLB_data$Q25,
                       levels = c(1, 2, 3, 4, 5),
                       labels = c("Student", "Employed", "Self-employed", "Unemployed", "Other"))

# Q26

NLB_data$Q26 <- factor(NLB_data$Q26,
                       levels = c(1, 2, 3, 4, 5),
                       labels = c("0-200 EUR", "201-500 EUR", "501-800 EUR", "801-1300 EUR", "Above 1300 EUR"))

# Q27

NLB_data$Q27 <- factor(NLB_data$Q27,
                       levels = c(1, 2, 3, 4, 5, 6, 7),
                       labels = c("NLB", "OTP", "Intesa Sanpaolo", "Sparkasse", "Addiko Bank", "Delovska Hranilnica", "Other"))



head(NLB_data)
##   Q1 Q3a Q3b Q3c Q3d Q4a Q4b Q4c Q4d                    Q5 Q5_4_text Q6a Q6b
## 1 23   3   2   5   2   4   3   2   1      Pay as available        -2   3   2
## 2 25   2   5   1   1   2   1   1   1 Pay digital elsewhere        -2   4   2
## 3 25   2   4   4   1   2   2   1   1      Pay as available        -2   3   3
## 4 23   3   5   5   1   2   2   1   1 Pay digital elsewhere        -2   3   3
## 5 23   2   5   5   1   2   1   1   1 Pay digital elsewhere        -2   4   3
## 6 25   3   3   1   2   4   3   2   1      Pay as available        -2   3   4
##   Q6c Q6d Q6e Q6f Q6g  Q7 Q8a Q9a Q9b Q9c Q9d Q9e Q9f Q9g Q9h Q31_2a Q31_2b
## 1   1   1   3   3   3 Yes   5   6   3   5   6   4   7   6   7      7      7
## 2   1   4   4   4   3 Yes   7   7   6   3   6   3   7   1   6      6      7
## 3   1   4   4   4   2 Yes   7   6   2   3   6   3   7   1   7      7      6
## 4   2   4   4   3   4 Yes   7   6   5   6   7   4   7   1   7      7      7
## 5   3   4   4   4   4  No  -2   7   4   7   4   4   7   4   7      7      7
## 6   1   1   3   3   4  No  -2   7   3   5   7   7   5   6   5      5      3
##   Q31_2c Q31_2d Q31_2e Q31_2f Q10a Q10b Q10c Q10d Q10e Q11a Q11b Q11c Q11d Q11e
## 1      6      6      3      6    6    6    6    7    6    5    6    6    7    6
## 2      5      7      7      6    3    7    7    3    6    7    7    7    6    6
## 3      6      6      4      5    6    6    4    6    6    4    7    7    7    7
## 4      7      7      7      7    6    5    4    6    6    3    6    6    7    7
## 5      7      7      7      7    7    4    4    4    4    7    7    7    7    7
## 6      7      7      4      4    7    6    6    5    5    6    7    7    6    6
##   Q12a Q12b Q12c Q12d Q12e Q13a Q13b Q13c Q13d Q13e Q14a Q14b Q14c Q14d Q14e
## 1    6    7    7    7    6    5    6    6    7    7    7    6    5    5    6
## 2    6    6    6    6    6    5    7    7    7    7    7    1    1    1    1
## 3    7    7    7    7    7    4    7    7    7    7    6    5    5    5    5
## 4    6    7    7    6    6    1    6    6    7    7    7    4    4    4    4
## 5    7    7    7    7    4    7    7    7    7    7    4    7    7    7    7
## 6    6    7    7    6    6    2    7    7    6    6    5    7    7    7    7
##   Q15a Q15b Q15c Q15d Q15e Q16a Q16b         Q17 Q17_5_text Q18a Q18b Q18c Q18d
## 1    7    5    5    3    3    5    2 Mobile apps         -2    1    0    1    0
## 2    2    7    4    1    6    4    4 Mobile apps         -2    1    1    1    0
## 3    5    7    7    7    7    4    4 Mobile apps         -2    1    1    1    1
## 4    6    5    1    5    5    7    7 Mobile apps         -2    1    1    1    1
## 5    4    7    7    7    7    4    4 Mobile apps         -2    1    1    1    1
## 6    7    6    5    3    5    3    5 Mobile apps         -2    1    0    0    0
##   Q18e Q18e_text Q19a Q19b Q19c Q19d          Q20 Q21a Q21b Q21c Q21d Q21e
## 1    0        -2    3    5    3    3 Yes - others    0    0    1    0    0
## 2    0        -2    5    5    6    7   Yes - both    0    0    1    0    0
## 3    0        -2    3    3    3    3           No   -2   -2   -2   -2   -2
## 4    0        -2    5    5    5    6           No   -2   -2   -2   -2   -2
## 5    0        -2    7    7    7    7     Yes - me   -1   -1   -1   -1   -1
## 6    0        -2    5    4    6    6 Yes - others    1    0    0    0    0
##                    Q22   Q23             Q24     Q25 Q25_5_text          Q26
## 1 Balance digital-cash   Man   Master Degree Student         -2  201-500 EUR
## 2 Balance digital-cash Woman Bachelor Degree Student         -2  201-500 EUR
## 3 Balance digital-cash Woman     High School Student         -2  501-800 EUR
## 4        Fully digital Woman     High School Student         -2  201-500 EUR
## 5        Fully digital Woman     High School Student         -2 801-1300 EUR
## 6           Don't know Woman   Master Degree Student         -2  201-500 EUR
##     Q27 Q27_7_text
## 1   OTP         -2
## 2   OTP         -2
## 3 Other  Unicredit
## 4   NLB         -2
## 5   NLB         -2
## 6   NLB         -2

3 Question for Prof. Marinšek

library(dplyr)

Replace NA values with column means for all numeric columns in NLB_data NLB_data <- NLB_data %>% mutate(across(where(is.numeric), ~ ifelse(is.na(.), mean(., na.rm = TRUE), .)))

Define the calculate_mode function before using it in mutate() calculate_mode <- function(x) { # Remove NA values x <- x[!is.na(x)]

# Return the most frequent value mode_value <- names(sort(table(x), decreasing = TRUE))[1] return(mode_value) }

Apply the function in dplyr library(dplyr)

NLB_data <- NLB_data %>% mutate(across(where(~ !is.numeric(.)), ~ ifelse(is.na(.), calculate_mode(.), .)))

View the updated dataset print(NLB_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4 Descriptive statistics

summary(NLB_data)
##        Q1         Q3a                Q3b                Q3c           
##  23     :64   Length:304         Length:304         Length:304        
##  22     :44   Class :character   Class :character   Class :character  
##  25     :43   Mode  :character   Mode  :character   Mode  :character  
##  20     :40                                                           
##  24     :30                                                           
##  21     :23                                                           
##  (Other):60                                                           
##      Q3d                Q4a                Q4b                Q4c           
##  Length:304         Length:304         Length:304         Length:304        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##      Q4d                                Q5       Q5_4_text        
##  Length:304         Pay digital elsewhere: 52   Length:304        
##  Class :character   Pay as available     :195   Class :character  
##  Mode  :character   Never occurred       : 42   Mode  :character  
##                     Other                : 15                     
##                                                                   
##                                                                   
##                                                                   
##      Q6a                Q6b                Q6c                Q6d           
##  Length:304         Length:304         Length:304         Length:304        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##      Q6e                Q6f                Q6g              Q7     
##  Length:304         Length:304         Length:304         Yes:233  
##  Class :character   Class :character   Class :character   No : 71  
##  Mode  :character   Mode  :character   Mode  :character            
##                                                                    
##                                                                    
##                                                                    
##                                                                    
##       Q8a             Q9a                Q9b                Q9c           
##  Min.   :-2.000   Length:304         Length:304         Length:304        
##  1st Qu.: 1.000   Class :character   Class :character   Class :character  
##  Median : 4.000   Mode  :character   Mode  :character   Mode  :character  
##  Mean   : 3.395                                                           
##  3rd Qu.: 7.000                                                           
##  Max.   : 7.000                                                           
##                                                                           
##      Q9d                Q9e                Q9f                Q9g           
##  Length:304         Length:304         Length:304         Length:304        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##      Q9h               Q31_2a             Q31_2b             Q31_2c         
##  Length:304         Length:304         Length:304         Length:304        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##     Q31_2d             Q31_2e             Q31_2f              Q10a          
##  Length:304         Length:304         Length:304         Length:304        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##      Q10b               Q10c               Q10d               Q10e          
##  Length:304         Length:304         Length:304         Length:304        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##      Q11a               Q11b               Q11c               Q11d          
##  Length:304         Length:304         Length:304         Length:304        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##      Q11e               Q12a               Q12b               Q12c          
##  Length:304         Length:304         Length:304         Length:304        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##      Q12d               Q12e               Q13a               Q13b          
##  Length:304         Length:304         Length:304         Length:304        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##      Q13c               Q13d               Q13e               Q14a          
##  Length:304         Length:304         Length:304         Length:304        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##      Q14b               Q14c               Q14d               Q14e          
##  Length:304         Length:304         Length:304         Length:304        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##      Q15a               Q15b               Q15c               Q15d          
##  Length:304         Length:304         Length:304         Length:304        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##      Q15e               Q16a               Q16b                      Q17     
##  Length:304         Length:304         Length:304         Cash         : 28  
##  Class :character   Class :character   Class :character   Mobile apps  :250  
##  Mode  :character   Mode  :character   Mode  :character   Bank transfer: 14  
##                                                           Don't share  :  8  
##                                                           Other        :  4  
##                                                                              
##                                                                              
##   Q17_5_text            Q18a               Q18b               Q18c          
##  Length:304         Length:304         Length:304         Length:304        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##      Q18d               Q18e            Q18e_text             Q19a          
##  Length:304         Length:304         Length:304         Length:304        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##      Q19b               Q19c               Q19d                     Q20     
##  Length:304         Length:304         Length:304         Yes - me    : 22  
##  Class :character   Class :character   Class :character   Yes - others: 96  
##  Mode  :character   Mode  :character   Mode  :character   Yes - both  : 11  
##                                                           No          :172  
##                                                           NA's        :  3  
##                                                                             
##                                                                             
##      Q21a               Q21b               Q21c               Q21d          
##  Length:304         Length:304         Length:304         Length:304        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##      Q21e                             Q22                        Q23     
##  Length:304         Fully digital       : 78   Man                 :120  
##  Class :character   Balance digital-cash:171   Woman               :182  
##  Mode  :character   Cash                : 44   Other               :  1  
##                     Don't know          : 10   Don't want to answer:  1  
##                     NA's                :  1                             
##                                                                          
##                                                                          
##                    Q24                 Q25       Q25_5_text       
##  Unfinished primary  :  0   Student      :236   Length:304        
##  Primary school      :  8   Employed     : 49   Class :character  
##  Vocational education:  2   Self-employed:  7   Mode  :character  
##  High School         :132   Unemployed   :  3                     
##  Bachelor Degree     : 99   Other        :  9                     
##  Master Degree       : 61                                         
##  PhD                 :  2                                         
##              Q26                      Q27       Q27_7_text       
##  0-200 EUR     :48   NLB                :121   Length:304        
##  201-500 EUR   :91   OTP                :109   Class :character  
##  501-800 EUR   :58   Intesa Sanpaolo    : 17   Mode  :character  
##  801-1300 EUR  :48   Sparkasse          :  7                     
##  Above 1300 EUR:57   Addiko Bank        :  8                     
##  NA's          : 2   Delovska Hranilnica: 19                     
##                      Other              : 23
library(dplyr)

# Convert character columns in specified ranges to numeric
NLB_data <- NLB_data %>%
  mutate(across(c(2:9, 11:18, 21:66, 68:78, 80:84, 89, 92), 
                ~ ifelse(!is.na(.), as.numeric(.), .)))
## Warning: There were 5 warnings in `mutate()`.
## The first warning was:
## ℹ In argument: `across(...)`.
## Caused by warning in `ifelse()`:
## ! NAs introduced by coercion
## ℹ Run `dplyr::last_dplyr_warnings()` to see the 4 remaining warnings.
summary(NLB_data)
##        Q1          Q3a             Q3b            Q3c             Q3d       
##  23     :64   Min.   :1.000   Min.   :1.00   Min.   :1.000   Min.   :1.000  
##  22     :44   1st Qu.:2.000   1st Qu.:2.00   1st Qu.:1.000   1st Qu.:1.000  
##  25     :43   Median :2.000   Median :4.00   Median :4.000   Median :1.000  
##  20     :40   Mean   :2.737   Mean   :3.51   Mean   :3.332   Mean   :1.546  
##  24     :30   3rd Qu.:4.000   3rd Qu.:4.00   3rd Qu.:5.000   3rd Qu.:2.000  
##  21     :23   Max.   :5.000   Max.   :5.00   Max.   :5.000   Max.   :5.000  
##  (Other):60                                                                 
##       Q4a             Q4b            Q4c             Q4d       
##  Min.   :1.000   Min.   :1.00   Min.   :1.000   Min.   :1.000  
##  1st Qu.:2.000   1st Qu.:1.00   1st Qu.:1.000   1st Qu.:1.000  
##  Median :2.000   Median :2.00   Median :1.000   Median :1.000  
##  Mean   :2.421   Mean   :2.03   Mean   :1.576   Mean   :1.398  
##  3rd Qu.:3.000   3rd Qu.:2.00   3rd Qu.:2.000   3rd Qu.:1.000  
##  Max.   :5.000   Max.   :5.00   Max.   :5.000   Max.   :5.000  
##                                                                
##                      Q5        Q5_4_text       Q6a             Q6b       
##  Pay digital elsewhere: 52   Min.   :-2   Min.   :1.000   Min.   :1.000  
##  Pay as available     :195   1st Qu.:-2   1st Qu.:3.000   1st Qu.:1.750  
##  Never occurred       : 42   Median :-2   Median :3.000   Median :3.000  
##  Other                : 15   Mean   :-2   Mean   :2.905   Mean   :2.651  
##                              3rd Qu.:-2   3rd Qu.:3.000   3rd Qu.:4.000  
##                              Max.   :-2   Max.   :4.000   Max.   :5.000  
##                              NA's   :15                                  
##       Q6c            Q6d             Q6e             Q6f             Q6g       
##  Min.   :1.00   Min.   :1.000   Min.   :1.000   Min.   :2.000   Min.   :1.000  
##  1st Qu.:1.00   1st Qu.:1.000   1st Qu.:4.000   1st Qu.:3.000   1st Qu.:3.000  
##  Median :1.00   Median :4.000   Median :4.000   Median :4.000   Median :4.000  
##  Mean   :1.28   Mean   :3.039   Mean   :3.796   Mean   :3.539   Mean   :3.674  
##  3rd Qu.:1.00   3rd Qu.:4.000   3rd Qu.:4.000   3rd Qu.:4.000   3rd Qu.:4.000  
##  Max.   :5.00   Max.   :5.000   Max.   :5.000   Max.   :5.000   Max.   :5.000  
##                                                                                
##    Q7           Q8a              Q9a             Q9b             Q9c       
##  Yes:233   Min.   :-2.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  No : 71   1st Qu.: 1.000   1st Qu.:4.000   1st Qu.:1.000   1st Qu.:2.000  
##            Median : 4.000   Median :6.000   Median :3.000   Median :4.000  
##            Mean   : 3.395   Mean   :5.316   Mean   :3.115   Mean   :3.655  
##            3rd Qu.: 7.000   3rd Qu.:7.000   3rd Qu.:4.000   3rd Qu.:5.000  
##            Max.   : 7.000   Max.   :7.000   Max.   :7.000   Max.   :7.000  
##                                                                            
##       Q9d             Q9e             Q9f             Q9g       
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:4.000   1st Qu.:3.000   1st Qu.:6.000   1st Qu.:1.000  
##  Median :6.000   Median :4.000   Median :7.000   Median :4.000  
##  Mean   :5.359   Mean   :4.135   Mean   :6.046   Mean   :3.441  
##  3rd Qu.:7.000   3rd Qu.:5.000   3rd Qu.:7.000   3rd Qu.:5.000  
##  Max.   :7.000   Max.   :7.000   Max.   :7.000   Max.   :7.000  
##                                                                 
##       Q9h            Q31_2a          Q31_2b      Q31_2c          Q31_2d     
##  Min.   :1.000   Min.   :1.000   Min.   :1   Min.   :1.000   Min.   :1.000  
##  1st Qu.:5.000   1st Qu.:6.000   1st Qu.:6   1st Qu.:6.000   1st Qu.:5.000  
##  Median :6.000   Median :7.000   Median :7   Median :7.000   Median :7.000  
##  Mean   :5.704   Mean   :6.105   Mean   :6   Mean   :6.168   Mean   :6.076  
##  3rd Qu.:7.000   3rd Qu.:7.000   3rd Qu.:7   3rd Qu.:7.000   3rd Qu.:7.000  
##  Max.   :7.000   Max.   :7.000   Max.   :7   Max.   :7.000   Max.   :7.000  
##                                                                             
##      Q31_2e          Q31_2f           Q10a            Q10b      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:4.000   1st Qu.:4.000   1st Qu.:4.000   1st Qu.:4.000  
##  Median :5.000   Median :6.000   Median :6.000   Median :5.000  
##  Mean   :5.201   Mean   :5.658   Mean   :5.503   Mean   :5.138  
##  3rd Qu.:7.000   3rd Qu.:7.000   3rd Qu.:7.000   3rd Qu.:6.000  
##  Max.   :7.000   Max.   :7.000   Max.   :7.000   Max.   :7.000  
##                                                                 
##       Q10c            Q10d            Q10e            Q11a      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:4.000   1st Qu.:4.000   1st Qu.:4.000   1st Qu.:4.000  
##  Median :5.000   Median :5.000   Median :5.000   Median :5.000  
##  Mean   :4.947   Mean   :5.174   Mean   :4.826   Mean   :5.102  
##  3rd Qu.:6.000   3rd Qu.:7.000   3rd Qu.:6.000   3rd Qu.:7.000  
##  Max.   :7.000   Max.   :7.000   Max.   :7.000   Max.   :7.000  
##                                                                 
##       Q11b            Q11c           Q11d           Q11e            Q12a      
##  Min.   :3.000   Min.   :3.00   Min.   :1.00   Min.   :1.000   Min.   :1.000  
##  1st Qu.:5.000   1st Qu.:5.00   1st Qu.:7.00   1st Qu.:4.000   1st Qu.:6.000  
##  Median :7.000   Median :7.00   Median :7.00   Median :6.000   Median :7.000  
##  Mean   :6.148   Mean   :6.02   Mean   :6.48   Mean   :5.592   Mean   :6.227  
##  3rd Qu.:7.000   3rd Qu.:7.00   3rd Qu.:7.00   3rd Qu.:7.000   3rd Qu.:7.000  
##  Max.   :7.000   Max.   :7.00   Max.   :7.00   Max.   :7.000   Max.   :7.000  
##                                                                               
##       Q12b            Q12c            Q12d           Q12e            Q13a      
##  Min.   :3.000   Min.   :2.000   Min.   :1.00   Min.   :1.000   Min.   :1.000  
##  1st Qu.:6.000   1st Qu.:6.000   1st Qu.:5.00   1st Qu.:4.000   1st Qu.:2.750  
##  Median :7.000   Median :7.000   Median :7.00   Median :5.000   Median :4.000  
##  Mean   :6.484   Mean   :6.336   Mean   :6.03   Mean   :5.076   Mean   :4.076  
##  3rd Qu.:7.000   3rd Qu.:7.000   3rd Qu.:7.00   3rd Qu.:7.000   3rd Qu.:6.000  
##  Max.   :7.000   Max.   :7.000   Max.   :7.00   Max.   :7.000   Max.   :7.000  
##                                                                                
##       Q13b            Q13c            Q13d            Q13e      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:5.000   1st Qu.:5.000   1st Qu.:7.000   1st Qu.:4.000  
##  Median :7.000   Median :7.000   Median :7.000   Median :6.000  
##  Mean   :6.174   Mean   :6.122   Mean   :6.526   Mean   :5.684  
##  3rd Qu.:7.000   3rd Qu.:7.000   3rd Qu.:7.000   3rd Qu.:7.000  
##  Max.   :7.000   Max.   :7.000   Max.   :7.000   Max.   :7.000  
##                                                                 
##       Q14a            Q14b            Q14c            Q14d      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:4.000   1st Qu.:4.000   1st Qu.:4.000   1st Qu.:3.000  
##  Median :7.000   Median :4.000   Median :4.000   Median :4.000  
##  Mean   :5.681   Mean   :4.457   Mean   :4.457   Mean   :4.395  
##  3rd Qu.:7.000   3rd Qu.:6.000   3rd Qu.:6.000   3rd Qu.:6.000  
##  Max.   :7.000   Max.   :7.000   Max.   :7.000   Max.   :7.000  
##                                                                 
##       Q14e            Q15a            Q15b            Q15c      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:4.000   1st Qu.:3.000   1st Qu.:4.000   1st Qu.:4.000  
##  Median :4.000   Median :5.000   Median :5.000   Median :5.000  
##  Mean   :4.484   Mean   :4.852   Mean   :5.155   Mean   :5.007  
##  3rd Qu.:6.000   3rd Qu.:7.000   3rd Qu.:7.000   3rd Qu.:7.000  
##  Max.   :7.000   Max.   :7.000   Max.   :7.000   Max.   :7.000  
##                                                                 
##       Q15d            Q15e            Q16a            Q16b      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:4.000   1st Qu.:4.000   1st Qu.:1.000   1st Qu.:1.000  
##  Median :5.000   Median :5.000   Median :3.000   Median :4.000  
##  Mean   :5.161   Mean   :5.115   Mean   :3.125   Mean   :3.339  
##  3rd Qu.:7.000   3rd Qu.:7.000   3rd Qu.:4.000   3rd Qu.:5.000  
##  Max.   :7.000   Max.   :7.000   Max.   :7.000   Max.   :7.000  
##                                                                 
##             Q17        Q17_5_text      Q18a              Q18b        
##  Cash         : 28   Min.   :-2   Min.   :-2.0000   Min.   :-2.0000  
##  Mobile apps  :250   1st Qu.:-2   1st Qu.: 1.0000   1st Qu.: 0.0000  
##  Bank transfer: 14   Median :-2   Median : 1.0000   Median : 0.0000  
##  Don't share  :  8   Mean   :-2   Mean   : 0.5132   Mean   : 0.1579  
##  Other        :  4   3rd Qu.:-2   3rd Qu.: 1.0000   3rd Qu.: 1.0000  
##                      Max.   :-2   Max.   : 1.0000   Max.   : 1.0000  
##                      NA's   :4                                       
##       Q18c              Q18d              Q18e           Q18e_text     
##  Min.   :-2.0000   Min.   :-2.0000   Min.   :-2.0000   Min.   :-2.000  
##  1st Qu.: 1.0000   1st Qu.: 0.0000   1st Qu.: 0.0000   1st Qu.:-2.000  
##  Median : 1.0000   Median : 0.0000   Median : 0.0000   Median :-2.000  
##  Mean   : 0.5164   Mean   : 0.1349   Mean   :-0.2368   Mean   :-1.997  
##  3rd Qu.: 1.0000   3rd Qu.: 1.0000   3rd Qu.: 0.0000   3rd Qu.:-2.000  
##  Max.   : 1.0000   Max.   : 1.0000   Max.   : 1.0000   Max.   :-1.000  
##                                                        NA's   :7       
##       Q19a             Q19b             Q19c             Q19d       
##  Min.   :-1.000   Min.   :-1.000   Min.   :-1.000   Min.   :-1.000  
##  1st Qu.: 4.000   1st Qu.: 4.000   1st Qu.: 3.000   1st Qu.: 4.000  
##  Median : 5.000   Median : 4.000   Median : 4.000   Median : 5.000  
##  Mean   : 4.507   Mean   : 4.457   Mean   : 4.273   Mean   : 4.849  
##  3rd Qu.: 6.000   3rd Qu.: 6.000   3rd Qu.: 6.000   3rd Qu.: 6.000  
##  Max.   : 7.000   Max.   : 7.000   Max.   : 7.000   Max.   : 7.000  
##                                                                     
##            Q20           Q21a             Q21b             Q21c        
##  Yes - me    : 22   Min.   :-2.000   Min.   :-2.000   Min.   :-2.0000  
##  Yes - others: 96   1st Qu.:-2.000   1st Qu.:-2.000   1st Qu.:-2.0000  
##  Yes - both  : 11   Median :-2.000   Median :-2.000   Median :-2.0000  
##  No          :172   Mean   :-1.039   Mean   :-1.072   Mean   :-0.8651  
##  NA's        :  3   3rd Qu.: 0.000   3rd Qu.: 0.000   3rd Qu.: 1.0000  
##                     Max.   : 1.000   Max.   : 1.000   Max.   : 1.0000  
##                                                                        
##       Q21d             Q21e                          Q22     
##  Min.   :-2.000   Min.   :-2.000   Fully digital       : 78  
##  1st Qu.:-2.000   1st Qu.:-2.000   Balance digital-cash:171  
##  Median :-2.000   Median :-2.000   Cash                : 44  
##  Mean   :-1.033   Mean   :-1.079   Don't know          : 10  
##  3rd Qu.: 0.000   3rd Qu.: 0.000   NA's                :  1  
##  Max.   : 1.000   Max.   : 1.000                             
##                                                              
##                    Q23                        Q24                 Q25     
##  Man                 :120   Unfinished primary  :  0   Student      :236  
##  Woman               :182   Primary school      :  8   Employed     : 49  
##  Other               :  1   Vocational education:  2   Self-employed:  7  
##  Don't want to answer:  1   High School         :132   Unemployed   :  3  
##                             Bachelor Degree     : 99   Other        :  9  
##                             Master Degree       : 61                      
##                             PhD                 :  2                      
##    Q25_5_text             Q26                      Q27        Q27_7_text
##  Min.   :-2   0-200 EUR     :48   NLB                :121   Min.   :-2  
##  1st Qu.:-2   201-500 EUR   :91   OTP                :109   1st Qu.:-2  
##  Median :-2   501-800 EUR   :58   Intesa Sanpaolo    : 17   Median :-2  
##  Mean   :-2   801-1300 EUR  :48   Sparkasse          :  7   Mean   :-2  
##  3rd Qu.:-2   Above 1300 EUR:57   Addiko Bank        :  8   3rd Qu.:-2  
##  Max.   :-2   NA's          : 2   Delovska Hranilnica: 19   Max.   :-2  
##  NA's   :9                        Other              : 23   NA's   :23

4.1 Categorical variables

  • Q17 – Preferred Payment Method for Expense Sharing When it comes to sharing expenses, the majority of respondents (250) prefer using mobile apps. A smaller group (28) opts for cash, while 14 respondents use bank transfers. Eight respondents do not share expenses with others, and four selected “Other” as their method of choice. This highlights the dominance of mobile apps as the most convenient and preferred option for managing shared expenses.
  • Q22 – Savings Preference Respondents show varied saving preferences. A majority (171) save their money in a balanced form, splitting between digital and cash. Fully digital savings are preferred by 78 respondents, while 44 save entirely in cash. A smaller group (10 respondents) is unsure of their savings method.
  • Q23 – Gender The gender distribution indicates that the majority of respondents (182) are women, while 120 are men. Additionally, 1 respondent identified as “Other,” and another preferred not to disclose their gender.
  • Q24 – Education Level The most common level of education is high school completion, with 132 respondents. Following this, 99 have a bachelor’s degree, 61 hold a master’s degree, and 2 have a PhD. Vocational education was reported by 2 respondents, and 8 completed only primary school, while none reported having incomplete primary education.
  • Q25 – Employment Status The majority of respondents (236) are students. Employed individuals account for 49 responses, followed by 7 self-employed, 3 unemployed, and 9 selecting “other” as their employment status.
  • Q26 – Monthly Income Regarding income, the largest group of respondents (91) earns between 201-500 EUR per month. Others reported the following income ranges: 0-200 EUR (48), 501-800 EUR (58), 801-1300 EUR (48), and above 1300 EUR (57).
  • Q27 – Bank Association Respondents are primarily associated with two major banks: NLB (121 respondents) and OTP (109 respondents). Smaller numbers of respondents use other banks such as Intesa Sanpaolo (17), Sparkasse (7), and Addiko Bank (8).

4.2 Numerical variables

Respondents show varying frequencies of cash usage based on the purchase amount. For small purchases (up to €10), the average usage is moderate, with a mean of 2.421 and a median of 2, indicating that cash is used occasionally but not regularly. Medium-small purchases (€11 to €99) have a slightly higher mean of 2.737 but still lean towards occasional use, with a median of 2. In contrast, for medium-large purchases (€100 to €1000), cash usage drops significantly, reflected by a mean of 1.576 and a median of 1, suggesting infrequent or rare use. This trend continues for large purchases (over €1000), where cash is almost never used, with a mean of 1.398 and a median of 1. Overall, cash usage declines as the purchase value increases, indicating a preference for alternative payment methods for higher-value transactions.

Respondents show a stronger tendency to be influenced by their family than by their friends when choosing payment methods. For Q16a (friends’ influence), the mean is 3.125 and the median is 3, indicating a neutral to slightly agreeing stance, with many respondents either disagreeing or moderately agreeing. In contrast, Q16b (family’s influence) has a higher mean of 3.339 and a median of 4, suggesting a more significant agreement with the statement. While both questions have a 1st quartile of 1, indicating strong disagreement from a subset of respondents, the 3rd quartile for family influence is 5, compared to 4 for friends, confirming that family has a stronger impact on respondents’ payment choices.

5 Clustering ideas

NLB_CluStd <- as.data.frame(scale(NLB_data[c("Q3a", "Q6a", "Q8a", "Q9g", "Q11a")]))

head(NLB_CluStd)
##          Q3a       Q6a        Q8a        Q9g        Q11a
## 1  0.2495495 0.1553635  0.4648959  1.2515560 -0.05416764
## 2 -0.6987386 1.7840011  1.0441105 -1.1936434  1.00821695
## 3 -0.6987386 0.1553635  1.0441105 -1.1936434 -0.58535993
## 4  0.2495495 0.1553635  1.0441105 -1.1936434 -1.11655222
## 5 -0.6987386 1.7840011 -1.5623551  0.2734763  1.00821695
## 6  0.2495495 0.1553635 -1.5623551  1.2515560  0.47702466
NLB_CluStd$Dissimilarity <- sqrt(NLB_CluStd$Q3a^2 + NLB_CluStd$Q6a^2 + NLB_CluStd$Q8a^2 + NLB_CluStd$Q9g^2 +NLB_CluStd$Q11a^2)

head(NLB_CluStd[order(-NLB_CluStd$Dissimilarity), ], n = 10)
##            Q3a       Q6a        Q8a        Q9g       Q11a Dissimilarity
## 204  2.1461256 -3.101912 -1.5623551  1.2515560  1.0082170      4.387660
## 191  2.1461256 -3.101912  0.4648959  1.7405959 -0.5853599      4.220919
## 299 -0.6987386 -3.101912  0.1752886 -1.1936434 -2.1789368      4.038981
## 216  0.2495495 -3.101912 -1.5623551 -1.1936434 -1.1165522      3.846630
## 214  1.1978375 -3.101912 -0.6935332  0.2734763  1.0082170      3.553724
## 184  1.1978375 -3.101912  1.0441105  0.2734763 -0.5853599      3.544612
## 277  0.2495495 -3.101912 -1.5623551  0.2734763 -0.5853599      3.541542
## 267 -0.6987386 -3.101912  0.4648959 -0.7046035 -1.1165522      3.474101
## 36   2.1461256 -1.473274  1.0441105  1.7405959  1.0082170      3.451483
## 211  2.1461256  1.784001 -1.5623551  0.7625161  1.0082170      3.439099

Three potential outliers (204, 191 and 299).

library(factoextra)
## Loading required package: ggplot2
## Welcome! Want to learn more? See two factoextra-related books at https://goo.gl/ve3WBa
Distances <- get_dist(NLB_CluStd,
                      method = "euclidian")

fviz_dist(Distances, 
          gradient = list(low = "red4",
                          mid = "grey",
                          high = "white"))

library(factoextra)
get_clust_tendency(NLB_CluStd,
                   n = nrow(NLB_CluStd) -1,
                   graph = FALSE)
## $hopkins_stat
## [1] 0.6800118
## 
## $plot
## NULL

Not the best one, we’ll find the perfect one :)

library(factoextra)
library(NbClust)
fviz_nbclust(NLB_CluStd, kmeans, method = "wss") +
  labs(subtitle = "Elbow Method")

fviz_nbclust(NLB_CluStd, kmeans, method = "silhouette") +
  labs(subtitle = "Silhouette analysis")

library(NbClust)
NbClust(NLB_CluStd,
        distance = "euclidean",
        min.nc = 2, max.nc = 10,
        method = "kmeans",
        index = "all")

## *** : The Hubert index is a graphical method of determining the number of clusters.
##                 In the plot of Hubert index, we seek a significant knee that corresponds to a 
##                 significant increase of the value of the measure i.e the significant peak in Hubert
##                 index second differences plot. 
## 

## *** : The D index is a graphical method of determining the number of clusters. 
##                 In the plot of D index, we seek a significant knee (the significant peak in Dindex
##                 second differences plot) that corresponds to a significant increase of the value of
##                 the measure. 
##  
## ******************************************************************* 
## * Among all indices:                                                
## * 5 proposed 2 as the best number of clusters 
## * 2 proposed 3 as the best number of clusters 
## * 6 proposed 4 as the best number of clusters 
## * 1 proposed 5 as the best number of clusters 
## * 2 proposed 6 as the best number of clusters 
## * 1 proposed 7 as the best number of clusters 
## * 1 proposed 9 as the best number of clusters 
## * 5 proposed 10 as the best number of clusters 
## 
##                    ***** Conclusion *****                            
##  
## * According to the majority rule, the best number of clusters is  4 
##  
##  
## *******************************************************************
## $All.index
##        KL      CH Hartigan     CCC    Scott      Marriot   TrCovW    TraceW
## 2  1.0377 84.6416  49.1694 14.8593 1139.345 2.281962e+14 51481.33 1290.0514
## 3  0.2444 73.5515  53.2049 14.0886 1401.196 2.169760e+14 38381.23 1109.4232
## 4  2.0836 75.1860  12.7837 17.1720 1668.964 1.598657e+14 28890.53  942.7775
## 5  0.3270 61.7817  53.3464 15.9155 1788.854 1.683838e+14 27521.34  904.2456
## 6  5.4645 68.6824  22.0934 19.0813 2023.107 1.122043e+14 18129.29  767.3398
## 7  1.3134 64.9423  18.4025 18.6996 2142.910 1.029797e+14 15402.32  714.3766
## 8  0.3878 61.5350  24.8668 20.5237 2209.750 1.079562e+14 13312.61  672.6954
## 9  1.1985 61.2671  21.7164 21.4497 2446.190 6.277320e+13 11879.58  620.5624
## 10 3.5310 60.6752  12.6659 22.1796 2575.570 5.063583e+13 10341.32  578.0120
##    Friedman  Rubin Cindex     DB Silhouette   Duda Pseudot2   Beale Ratkowsky
## 2   14.6649 2.3487 0.4076 1.8808     0.2105 0.9753   4.0211  0.0965    0.2946
## 3   17.1954 2.7311 0.4592 1.6764     0.2030 1.0533  -6.8310 -0.1929    0.2999
## 4   18.2173 3.2139 0.3938 1.4672     0.2277 1.4457 -33.6041 -1.1705    0.3095
## 5   22.1979 3.3509 0.4345 1.5311     0.2255 3.2181 -84.7792 -2.5634    0.2899
## 6   27.1141 3.9487 0.4014 1.4495     0.2336 1.8988 -21.7745 -1.7584    0.2958
## 7   26.6437 4.2415 0.4030 1.5645     0.2140 1.4445 -18.4638 -1.1366    0.2807
## 8   26.9003 4.5043 0.4118 1.4442     0.2353 3.7139 -54.0748 -2.6357    0.2676
## 9   39.8438 4.8827 0.3582 1.3539     0.2332 3.4538 -40.4964 -2.5726    0.2631
## 10  39.6847 5.2421 0.3448 1.3475     0.2392 2.7310 -38.0301 -2.2862    0.2536
##        Ball Ptbiserial    Frey McClain   Dunn Hubert SDindex Dindex   SDbw
## 2  645.0257     0.3809  0.2363  0.7479 0.0727 0.0013  1.9147 1.9727 0.8195
## 3  369.8077     0.4401  0.1702  1.2028 0.0884 0.0016  1.6701 1.8433 0.7350
## 4  235.6944     0.4850  0.0547  1.6643 0.0824 0.0017  1.4301 1.6858 0.6234
## 5  180.8491     0.4922  0.2166  1.7104 0.0920 0.0020  1.6545 1.6537 0.6393
## 6  127.8900     0.5109  0.5116  2.3001 0.0935 0.0023  1.4946 1.5161 0.5492
## 7  102.0538     0.4822 -0.1088  3.0160 0.1151 0.0023  1.7395 1.4455 0.4988
## 8   84.0869     0.4981  0.3687  2.9932 0.1075 0.0023  1.5378 1.4143 0.4656
## 9   68.9514     0.4818  0.2400  3.5066 0.0935 0.0027  1.8485 1.3503 0.4710
## 10  57.8012     0.4739  0.8551  3.9086 0.0988 0.0028  1.7652 1.3067 0.4360
## 
## $All.CriticalValues
##    CritValue_Duda CritValue_PseudoT2 Fvalue_Beale
## 2          0.7432            54.9395       0.9967
## 3          0.7293            50.1032       1.0000
## 4          0.6981            47.1404       1.0000
## 5          0.5853            87.1490       1.0000
## 6          0.5802            33.2833       1.0000
## 7          0.5569            47.7335       1.0000
## 8          0.4772            81.0803       1.0000
## 9          0.4889            59.5851       1.0000
## 10         0.4772            65.7408       1.0000
## 
## $Best.nc
##                     KL      CH Hartigan     CCC    Scott      Marriot   TrCovW
## Number_clusters 6.0000  2.0000   5.0000 10.0000   4.0000 4.000000e+00     3.00
## Value_Index     5.4645 84.6416  40.5628 22.1796 267.7683 6.562841e+13 13100.09
##                   TraceW Friedman   Rubin  Cindex      DB Silhouette   Duda
## Number_clusters   4.0000   9.0000  4.0000 10.0000 10.0000    10.0000 2.0000
## Value_Index     128.1139  12.9435 -0.3458  0.3448  1.3475     0.2392 0.9753
##                 PseudoT2  Beale Ratkowsky    Ball PtBiserial Frey McClain
## Number_clusters   2.0000 2.0000    4.0000   3.000     6.0000    1  2.0000
## Value_Index       4.0211 0.0965    0.3095 275.218     0.5109   NA  0.7479
##                   Dunn Hubert SDindex Dindex   SDbw
## Number_clusters 7.0000      0  4.0000      0 10.000
## Value_Index     0.1151      0  1.4301      0  0.436
## 
## $Best.partition
##   [1] 1 2 2 2 4 4 2 2 1 2 2 4 1 2 4 2 4 2 4 2 4 4 1 1 2 3 3 2 1 2 2 2 2 1 2 1 2
##  [38] 1 2 2 2 1 2 2 4 3 2 2 3 1 4 2 3 1 2 2 1 2 4 3 4 4 4 2 1 1 2 2 1 2 2 2 3 1
##  [75] 2 2 2 4 1 2 1 2 2 1 4 1 2 1 2 3 2 1 2 1 2 2 3 1 4 1 2 2 4 4 2 4 4 2 2 1 2
## [112] 2 4 1 1 2 1 1 2 2 1 2 2 1 2 2 1 2 2 2 2 1 1 4 2 3 3 1 4 2 2 3 1 2 4 1 2 2
## [149] 1 2 3 2 1 1 4 4 1 2 4 3 3 2 2 2 1 2 4 1 1 2 2 1 1 2 2 2 1 2 4 4 2 2 4 3 2
## [186] 4 1 1 4 2 3 3 2 2 2 2 2 3 4 1 1 3 3 3 1 2 2 3 4 1 1 1 1 3 2 3 1 2 1 4 1 2
## [223] 3 2 2 4 1 1 4 2 4 2 4 2 2 1 1 1 2 2 1 3 3 3 4 3 4 2 4 4 4 4 4 1 1 1 1 3 2
## [260] 1 4 2 2 2 2 2 3 3 3 4 4 4 3 2 3 3 3 2 1 4 4 3 2 3 2 4 2 1 1 4 3 2 1 2 2 2
## [297] 4 4 3 2 4 1 4 2

6 Conclusion

Will we follow the code? Or will we revolutionize our findings? Keep up on the next episode

The Payvolutionaries