# Loading required libraries
library(readr)
library(tidyr)
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
library(ggplot2)
library(factoextra)
## Welcome! Want to learn more? See two factoextra-related books at https://goo.gl/ve3WBa
# Loading the dataset
library(readr)
Motivation <- read_csv("C:/Users/daniv/Downloads/Motivation.csv")
## Rows: 665 Columns: 14
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (14): job_market, job_areas, income, requirement, interest, broader_hori...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
# Display summary statistics
summary(Motivation)
## job_market job_areas income requirement interest
## Min. :1.000 Min. :1.00 Min. :1.000 Min. :1.000 Min. :1.000
## 1st Qu.:1.000 1st Qu.:1.00 1st Qu.:2.000 1st Qu.:1.000 1st Qu.:1.000
## Median :2.000 Median :2.00 Median :2.000 Median :2.000 Median :2.000
## Mean :1.738 Mean :1.97 Mean :2.463 Mean :2.483 Mean :1.761
## 3rd Qu.:2.000 3rd Qu.:2.00 3rd Qu.:3.000 3rd Qu.:3.000 3rd Qu.:2.000
## Max. :5.000 Max. :5.00 Max. :5.000 Max. :5.000 Max. :5.000
## broader_horizon specializations further_education friends
## Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000
## 1st Qu.:1.000 1st Qu.:2.000 1st Qu.:3.000 1st Qu.:4.000
## Median :2.000 Median :2.000 Median :5.000 Median :5.000
## Mean :1.949 Mean :2.552 Mean :3.835 Mean :4.415
## 3rd Qu.:3.000 3rd Qu.:3.000 3rd Qu.:5.000 3rd Qu.:5.000
## Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000
## no_idea family student_life academic_title
## Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000
## 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:2.000
## Median :5.000 Median :5.000 Median :4.000 Median :3.000
## Mean :4.108 Mean :4.138 Mean :3.471 Mean :3.033
## 3rd Qu.:5.000 3rd Qu.:5.000 3rd Qu.:5.000 3rd Qu.:4.000
## Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000
## WU_reputation
## Min. :1.000
## 1st Qu.:2.000
## Median :2.000
## Mean :2.525
## 3rd Qu.:3.000
## Max. :5.000
correlation_matrix <- cor(Motivation)
print(correlation_matrix)
## job_market job_areas income requirement interest
## job_market 1.000000000 0.41019350 0.45075453 0.30090409 0.21456939
## job_areas 0.410193504 1.00000000 0.37712136 0.17692839 0.12077740
## income 0.450754529 0.37712136 1.00000000 0.21210709 -0.03705413
## requirement 0.300904092 0.17692839 0.21210709 1.00000000 0.13246736
## interest 0.214569391 0.12077740 -0.03705413 0.13246736 1.00000000
## broader_horizon 0.147702597 0.15639767 0.04357249 0.06833456 0.33236720
## specializations 0.156477928 0.34510943 0.21255949 0.11011069 0.18369769
## further_education 0.001418820 -0.03433017 0.06735935 -0.03705719 0.02709140
## friends -0.032796056 0.01035598 0.13050858 -0.01684908 -0.17780082
## no_idea -0.189122973 -0.15537733 0.06202983 -0.13260813 -0.42098928
## family 0.013953380 0.02969020 0.08268655 0.17627173 -0.11433691
## student_life 0.002563345 0.01451251 0.07408213 0.11627585 -0.03642876
## academic_title 0.187793060 0.20229699 0.30321732 0.18749622 -0.06199301
## WU_reputation 0.259231578 0.39651851 0.23495616 0.17397241 0.06511413
## broader_horizon specializations further_education friends
## job_market 0.14770260 0.15647793 0.00141882 -0.03279606
## job_areas 0.15639767 0.34510943 -0.03433017 0.01035598
## income 0.04357249 0.21255949 0.06735935 0.13050858
## requirement 0.06833456 0.11011069 -0.03705719 -0.01684908
## interest 0.33236720 0.18369769 0.02709140 -0.17780082
## broader_horizon 1.00000000 0.19778885 0.05867910 -0.06653369
## specializations 0.19778885 1.00000000 0.09747622 0.09722971
## further_education 0.05867910 0.09747622 1.00000000 0.05526779
## friends -0.06653369 0.09722971 0.05526779 1.00000000
## no_idea -0.24173968 -0.14826377 -0.05736411 0.20441328
## family -0.08354939 0.01279697 -0.05694739 0.09448856
## student_life 0.09707589 0.06030416 -0.10569963 0.18483861
## academic_title 0.01364916 0.13018098 -0.07528844 0.06244046
## WU_reputation 0.08664678 0.35531435 0.02668760 0.10120262
## no_idea family student_life academic_title
## job_market -0.18912297 0.01395338 0.002563345 0.18779306
## job_areas -0.15537733 0.02969020 0.014512506 0.20229699
## income 0.06202983 0.08268655 0.074082132 0.30321732
## requirement -0.13260813 0.17627173 0.116275845 0.18749622
## interest -0.42098928 -0.11433691 -0.036428757 -0.06199301
## broader_horizon -0.24173968 -0.08354939 0.097075893 0.01364916
## specializations -0.14826377 0.01279697 0.060304157 0.13018098
## further_education -0.05736411 -0.05694739 -0.105699629 -0.07528844
## friends 0.20441328 0.09448856 0.184838611 0.06244046
## no_idea 1.00000000 0.12804234 0.187318684 0.02177788
## family 0.12804234 1.00000000 0.178383376 0.38990326
## student_life 0.18731868 0.17838338 1.000000000 0.10549284
## academic_title 0.02177788 0.38990326 0.105492839 1.00000000
## WU_reputation -0.03074069 0.11528328 0.116886057 0.28061359
## WU_reputation
## job_market 0.25923158
## job_areas 0.39651851
## income 0.23495616
## requirement 0.17397241
## interest 0.06511413
## broader_horizon 0.08664678
## specializations 0.35531435
## further_education 0.02668760
## friends 0.10120262
## no_idea -0.03074069
## family 0.11528328
## student_life 0.11688606
## academic_title 0.28061359
## WU_reputation 1.00000000
This table showcases the pairwise correlations among various variables in the dataset, ranging from -1 to 1, where:
A score of 1 signifies a perfect positive correlation, indicating that as one variable increases, the other increases proportionally. A score of -1 indicates a perfect negative correlation, suggesting that as one variable increases, the other decreases proportionally. A score of 0 denotes no correlation, implying that the variables operate independently of each other. Interpretation of the Correlation Table:
Positive Correlations:
A substantial positive correlation (0.3965) is observed between job_areas and WU_reputation. This implies that individuals valuing diverse job areas are also likely to hold the university’s reputation in high regard. A positive correlation (0.2592) is noted between job_market and WU_reputation, indicating that those emphasizing high job market opportunities also value the university’s reputation. Negative Correlations:
A significant negative correlation (-0.4209) exists between interest and no_idea. This suggests that students expressing strong interest in Business and Administration are less prone to selecting “no idea” as a motivator. Other Noteworthy Correlations:
A positive correlation (0.3324) is found between interest and broader_horizon, suggesting that those interested in Business and Administration also exhibit a broader interest in learning new things. There is a positive correlation (0.3451) between specializations and job_areas, indicating that students valuing diverse job areas are also inclined to appreciate a variety of specialization possibilities. Weak Correlations: Several variables exhibit weak correlations, indicating their relative independence from each other.
Important Reminder: It is crucial to emphasize that correlation does not imply causation. While the correlation values offer insights into variable relationships, they do not establish a cause-and-effect connection. A positive correlation between two variables does not necessarily mean that one variable causes changes in the other.
# Selecting relevant columns for clustering
columns_for_clustering <- Motivation[, c("job_market", "job_areas", "income", "requirement", "interest",
"broader_horizon", "specializations", "further_education",
"friends", "no_idea", "family", "student_life",
"academic_title", "WU_reputation")]
# Standardizing the data (important for k-means)
scaled_data <- scale(columns_for_clustering)
In the graph, we can pinpoint the ‘elbow’ position where the decline in Within-Cluster Sum of Squares (WSS) decelerates. This observation indicates that the optimal number of clusters is 4.
# Choose the optimal number of clusters (replace 'k' with the chosen number)
k <- 4
# Perform k-means clustering
kmeans_result <- kmeans(scaled_data, centers = k, nstart = 25)
# Add the cluster assignment to your original dataset
Motivation$cluster <- as.factor(kmeans_result$cluster)
# Extract the coordinates of the cluster centers
cluster_centers <- kmeans_result$centers
# Print the cluster centers
print(cluster_centers)
## job_market job_areas income requirement interest broader_horizon
## 1 -0.4195476 -0.4898367 -0.4221918 -0.41412201 -0.2401925 -0.255887691
## 2 0.7082947 0.7608538 1.0245274 0.31848900 -0.2259343 0.003551109
## 3 0.4652318 0.3684486 -0.1713572 0.31817653 1.2390525 0.852597029
## 4 -0.4984379 -0.3806587 -0.3650127 0.02522093 -0.3226476 -0.261669282
## specializations further_education friends no_idea family
## 1 -0.3962963 0.4028866 -0.1111568 0.3667372 -0.3802831
## 2 0.5082697 0.1315514 0.3366540 0.2803297 0.3826915
## 3 0.4181543 0.1210440 -0.5503061 -1.5098520 -0.5098258
## 4 -0.2807600 -0.8224256 0.2061931 0.2792791 0.5204004
## student_life academic_title WU_reputation
## 1 -0.2977632 -0.7272117 -0.57960042
## 2 0.2155850 0.6789638 0.69943229
## 3 -0.3443948 -0.2042589 0.18901139
## 4 0.4579315 0.4806511 -0.04949444
Cluster 1: Highly Positive Aspects - job_market: Very high, signifying a strong inclination toward WU Vienna University of Economics and Business due to excellent job market opportunities. - job_areas: Very high, indicating a keen interest in a variety of potential job sectors. - income: Very high, demonstrating a significant preference for higher income as a motivating factor. - requirement: Positive, emphasizing the importance of considering future job requirements. - interest: Slightly negative, suggesting a relatively lower interest in Business and Administration compared to other clusters. - broader_horizon: Positive but approaching zero, hinting at a neutral stance on expanding knowledge or horizons.
Cluster 2: Balanced or Neutral Factors All factors in this cluster are centered around zero, portraying a neutral perspective on various motivators for choosing WU Vienna University of Economics and Business. This cluster does not display strong inclinations or aversions to any specific motivating factor.
Cluster 3: Positive Factors with Personal Development Focus - job_market: Positive, revealing a preference for WU due to promising job market opportunities. - job_areas: Positive, suggesting an interest in a variety of potential job sectors. - income: Negative, indicating a lower emphasis on higher income as a motivating factor. - requirement: Positive, highlighting the importance of future job requirements. - interest: Very high, showcasing a strong interest in Business and Administration. - broader_horizon: Very high, indicating a keen interest in exploring new areas of knowledge and broadening horizons. - specializations: Positive, expressing a preference for diverse specialization possibilities.
Cluster 4: Mixed Preferences - job_market: Slightly negative, suggesting a relatively diminished preference for abundant job market opportunities. - job_areas: Negative, indicating a reduced interest in the variety of potential job sectors. - income: Negative, suggesting a reduced preference for higher income. - requirement: Positive, acknowledging the importance of future job requirements. - interest: Slightly negative, indicating a somewhat subdued interest in Business and Administration. - broader_horizon: Negative, implying a diminished interest in exploring new areas of knowledge or broadening horizons.