mydata <- read.csv("Game_Survey_Clean.csv")
head(mydata)
## ID Age_group Gender Purchase_freq Spend_group Worth_price Top_worth_factor
## 1 1 1 1 2 2 1 2
## 2 2 1 2 3 2 4 1
## 3 3 1 2 1 1 4 1
## 4 4 1 2 1 1 4 2
## 5 5 1 2 2 2 5 1
## 6 6 1 2 1 1 4 1
## Rank_price Rank_graphics Rank_length Rank_type Platform Game_mode
## 1 -1 0 0 1 1 NA
## 2 0 1 0 -1 1 1
## 3 0 1 0 0 NA NA
## 4 0 0 1 -1 1 2
## 5 0 1 -1 0 NA 1
## 6 1 0 -1 0 1 2
## Incl_content
## 1 1
## 2 NA
## 3 NA
## 4 1
## 5 NA
## 6 NA
summary(mydata)
## ID Age_group Gender Purchase_freq Spend_group
## Min. : 1.0 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000
## 1st Qu.: 3.5 1st Qu.:1.000 1st Qu.:2.000 1st Qu.:1.000 1st Qu.:1.000
## Median : 6.0 Median :1.000 Median :2.000 Median :1.000 Median :1.000
## Mean : 6.0 Mean :1.182 Mean :1.909 Mean :1.364 Mean :1.273
## 3rd Qu.: 8.5 3rd Qu.:1.000 3rd Qu.:2.000 3rd Qu.:1.500 3rd Qu.:1.500
## Max. :11.0 Max. :2.000 Max. :3.000 Max. :3.000 Max. :2.000
##
## Worth_price Top_worth_factor Rank_price Rank_graphics
## Min. :1.000 Min. :1.000 Min. :-1.0000 Min. :-1.0000
## 1st Qu.:1.500 1st Qu.:1.000 1st Qu.: 0.0000 1st Qu.: 0.0000
## Median :4.000 Median :1.000 Median : 0.0000 Median : 0.0000
## Mean :3.182 Mean :1.818 Mean : 0.2727 Mean : 0.2727
## 3rd Qu.:4.000 3rd Qu.:2.500 3rd Qu.: 1.0000 3rd Qu.: 1.0000
## Max. :5.000 Max. :4.000 Max. : 1.0000 Max. : 1.0000
##
## Rank_length Rank_type Platform Game_mode
## Min. :-1.0000 Min. :-1.00000 Min. :1.000 Min. :1.0
## 1st Qu.:-1.0000 1st Qu.:-0.50000 1st Qu.:1.000 1st Qu.:1.0
## Median : 0.0000 Median : 0.00000 Median :1.000 Median :1.0
## Mean :-0.2727 Mean :-0.09091 Mean :1.143 Mean :1.4
## 3rd Qu.: 0.0000 3rd Qu.: 0.00000 3rd Qu.:1.000 3rd Qu.:2.0
## Max. : 1.0000 Max. : 1.00000 Max. :2.000 Max. :2.0
## NAs :4 NAs :6
## Incl_content
## Min. :1.000
## 1st Qu.:1.000
## Median :1.000
## Mean :1.333
## 3rd Qu.:1.500
## Max. :2.000
## NAs :8
mydata2 <- mydata[, c("Purchase_freq",
"Spend_group",
"Worth_price")]
head(mydata2)
## Purchase_freq Spend_group Worth_price
## 1 2 2 1
## 2 3 2 4
## 3 1 1 4
## 4 1 1 4
## 5 2 2 5
## 6 1 1 4
mydata3 <- scale(mydata2)
head(mydata3)
## Purchase_freq Spend_group Worth_price
## [1,] 0.9438798 1.5569979 -1.3626689
## [2,] 2.4271195 1.5569979 0.5110008
## [3,] -0.5393599 -0.5838742 0.5110008
## [4,] -0.5393599 -0.5838742 0.5110008
## [5,] 0.9438798 1.5569979 1.1355574
## [6,] -0.5393599 -0.5838742 0.5110008
d <- dist(mydata3, method = "euclidean")
fit <- hclust(d, method = "complete")
plot(fit, main = "Video Game Customer Segmentation",
xlab = "Customers", sub = "")
rect.hclust(fit, k = 3, border = 2:4)
groups <- cutree(fit, k = 3)
table(groups)
## groups
## 1 2 3
## 3 5 3
mydata$ID[groups == 1]
## [1] 1 2 5
mydata$ID[groups == 2]
## [1] 3 4 6 9 10
mydata$ID[groups == 3]
## [1] 7 8 11
clustermeans <- aggregate(mydata2,
by = list(Cluster = groups),
FUN = mean)
clustermeans
## Cluster Purchase_freq Spend_group Worth_price
## 1 1 2.333333 2 3.333333
## 2 2 1.000000 1 4.200000
## 3 3 1.000000 1 1.333333
clusterID <- data.frame(ID = mydata$ID,
Cluster = groups)
clusterID
## ID Cluster
## 1 1 1
## 2 2 1
## 3 3 2
## 4 4 2
## 5 5 1
## 6 6 2
## 7 7 3
## 8 8 3
## 9 9 2
## 10 10 2
## 11 11 3
write.csv(clusterID, "clusterID.csv",
row.names = FALSE)
write.csv(clustermeans, "clustermeans.csv",
row.names = FALSE)
This group includes three customers who purchase video games more frequently and spend more than the other groups.
This group includes five customers who believe video games are worth their price but rarely purchase them.
This group includes three customers who rarely purchase video games and have the lowest perceived value.
Video game companies can target active purchasers through new releases, value-oriented customers through discounts, and skeptical customers through free trials.
Our sample only included 11 respondents, which limits our understanding of the overall video game market.