The objective of this analysis is to examine the relationship between social media engagement and video game sales-related posts on Bluesky.
Group 6.7: Gabriel, David, Marco, and Dakota.
library(readr)
raw_data <- read_csv("video_game_sales_raw.csv")
## Rows: 196 Columns: 23
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (15): uri, cid, author_handle, author_name, text, author_data, post_data...
## dbl (7): reply_count, repost_count, like_count, quote_count, bookmark_count...
## lgl (1): labels
##
## ℹ 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.
head(raw_data)
## # A tibble: 6 × 23
## uri cid author_handle author_name text author_data post_data embed_data
## <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
## 1 at://d… bafy… fgd47.bsky.s… FGD "198… "did:plc:t… "app.bsk… "list(uri…
## 2 at://d… bafy… sophiane-enj… Nint - Sop… "Wat… "did:plc:u… "app.bsk… <NA>
## 3 at://d… bafy… asadotzler.c… Asa Dotzler "\"A… "did:plc:7… "app.bsk… <NA>
## 4 at://d… bafy… freegg.gg FreeGG "@sa… "did:plc:x… "app.bsk… <NA>
## 5 at://d… bafy… harmansmith.… Harman Smi… "Jus… "did:plc:g… "app.bsk… <NA>
## 6 at://d… bafy… andersnilsso… Anders Nil… "\"A… "did:plc:m… "app.bsk… "list(uri…
## # ℹ 15 more variables: reply_count <dbl>, repost_count <dbl>, like_count <dbl>,
## # quote_count <dbl>, bookmark_count <dbl>, indexed_at <dbl>,
## # created_at <dbl>, in_reply_to <chr>, in_reply_root <chr>, quotes <chr>,
## # tags <chr>, mentions <chr>, links <chr>, langs <chr>, labels <lgl>
dim(raw_data)
## [1] 196 23
sum(duplicated(raw_data$uri))
## [1] 0
segmentation <- raw_data[, c("like_count",
"repost_count",
"reply_count",
"quote_count")]
colSums(is.na(segmentation))
## like_count repost_count reply_count quote_count
## 0 0 0 0
write_csv(segmentation, "video_game_sales_cleaned.csv")
The original dataset contained 196 posts and 23 variables. Four engagement variables were selected for the regression analysis. There were no duplicate posts or missing values in the selected variables.
segmentation <- read_csv("video_game_sales_cleaned.csv")
## Rows: 196 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (4): like_count, repost_count, reply_count, quote_count
##
## ℹ 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.
head(segmentation)
## # A tibble: 6 × 4
## like_count repost_count reply_count quote_count
## <dbl> <dbl> <dbl> <dbl>
## 1 0 0 0 0
## 2 7 0 1 0
## 3 1 2 1 0
## 4 0 0 0 0
## 5 0 0 0 0
## 6 0 0 0 0
summary(segmentation)
## like_count repost_count reply_count quote_count
## Min. : 0.00 Min. : 0.0000 Min. : 0.0000 Min. :0.0000
## 1st Qu.: 0.00 1st Qu.: 0.0000 1st Qu.: 0.0000 1st Qu.:0.0000
## Median : 1.00 Median : 0.0000 Median : 0.0000 Median :0.0000
## Mean : 3.76 Mean : 0.4286 Mean : 0.3878 Mean :0.1071
## 3rd Qu.: 3.00 3rd Qu.: 0.0000 3rd Qu.: 1.0000 3rd Qu.:0.0000
## Max. :123.00 Max. :14.0000 Max. :10.0000 Max. :6.0000
plot(like_count ~ repost_count, data = segmentation, pch = 16)
abline(lm(like_count ~ repost_count, segmentation), col = "grey20")
There is a strong positive relationship between reposts and likes. Posts with more reposts tend to receive more likes.
# Simple Linear Regression (one predictor)
simple_model <- lm(like_count ~ repost_count, data = segmentation)
simple_model
##
## Call:
## lm(formula = like_count ~ repost_count, data = segmentation)
##
## Coefficients:
## (Intercept) repost_count
## 0.8906 6.6958
summary(simple_model)
##
## Call:
## lm(formula = like_count ~ repost_count, data = segmentation)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.457 -0.891 -0.891 1.109 41.109
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.8906 0.4037 2.206 0.0286 *
## repost_count 6.6958 0.2372 28.234 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.47 on 194 degrees of freedom
## Multiple R-squared: 0.8043, Adjusted R-squared: 0.8033
## F-statistic: 797.2 on 1 and 194 DF, p-value: < 2.2e-16
# multivarite Linear Regression (three predictors)
multivarite_model <- lm(like_count ~ repost_count + reply_count + quote_count, data = segmentation)
multivarite_model
##
## Call:
## lm(formula = like_count ~ repost_count + reply_count + quote_count,
## data = segmentation)
##
## Coefficients:
## (Intercept) repost_count reply_count quote_count
## 0.464 5.223 1.827 3.260
summary(multivarite_model)
##
## Call:
## lm(formula = like_count ~ repost_count + reply_count + quote_count,
## data = segmentation)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.955 -0.464 -0.464 0.536 39.709
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.4640 0.3842 1.208 0.228697
## repost_count 5.2226 0.3114 16.772 < 2e-16 ***
## reply_count 1.8275 0.4761 3.838 0.000168 ***
## quote_count 3.2605 0.7183 4.539 9.94e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.97 on 192 degrees of freedom
## Multiple R-squared: 0.8401, Adjusted R-squared: 0.8376
## F-statistic: 336.1 on 3 and 192 DF, p-value: < 2.2e-16
summary(simple_model)$r.squared
## [1] 0.804271
summary(multivarite_model)$r.squared
## [1] 0.8400544
summary(simple_model)$adj.r.squared
## [1] 0.8032621
summary(multivarite_model)$adj.r.squared
## [1] 0.8375553
cor(segmentation$like_count, segmentation$repost_count)
## [1] 0.8968116
Reposts were the strongest predictor of likes. The simple regression explained 80.43% of the variation in likes, while the multivariate regression explained 84.01%.
Adding replies and quotes improved the model’s explanatory power. However, social media engagement does not necessarily lead to increased video game sales.