library(readxl)
library(corrplot)
## Warning: package 'corrplot' was built under R version 4.3.1
## corrplot 0.92 loaded
library(ggplot2)
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
# Read the Excel file
data_xlsx <- read_excel("Facebook Friends (1).xlsx", sheet = 1)
# Identify numerical variables
numerical_vars <- sapply(data_xlsx, is.numeric)
# Identify non-binary numerical variables
non_binary_numerical_vars <- numerical_vars & sapply(data_xlsx, function(x) length(unique(x)) > 2)
# Extract non-binary numerical values
non_binary_numerical_vals <- data_xlsx[, non_binary_numerical_vars]
# Calculate correlation coefficients
cor_matrix <- cor(non_binary_numerical_vals)
# Display the correlation matrix
cor_matrix
## Friend Age Photos # of Tags Albums
## Friend 1.00000000 -0.040065749 0.07192247 0.08446608 0.05664016
## Age -0.04006575 1.000000000 -0.08576964 -0.12678370 -0.03619525
## Photos 0.07192247 -0.085769636 1.00000000 0.52953749 0.79480904
## # of Tags 0.08446608 -0.126783704 0.52953749 1.00000000 0.54972351
## Albums 0.05664016 -0.036195249 0.79480904 0.54972351 1.00000000
## Gender 0.13708770 -0.054127322 -0.20420963 -0.15461140 -0.19702834
## Posts -0.15405951 -0.028473891 0.06181539 0.06480031 0.11234141
## Replies -0.13207322 -0.043138690 0.07344995 0.08701351 0.12577223
## Children -0.05551170 0.572905558 -0.10157805 -0.11047158 -0.07783486
## Likes 0.15510418 -0.170365200 0.11933987 0.07462884 0.15355255
## Events 0.03125558 0.005088027 0.06982910 0.04161505 0.04363003
## Friends 0.09891109 -0.198576001 0.24564233 0.23814371 0.22842387
## Gender Posts Replies Children Likes
## Friend 0.137087700 -0.154059513 -0.13207322 -0.05551170 0.15510418
## Age -0.054127322 -0.028473891 -0.04313869 0.57290556 -0.17036520
## Photos -0.204209635 0.061815389 0.07344995 -0.10157805 0.11933987
## # of Tags -0.154611397 0.064800313 0.08701351 -0.11047158 0.07462884
## Albums -0.197028340 0.112341409 0.12577223 -0.07783486 0.15355255
## Gender 1.000000000 0.005080669 0.01542067 -0.13583910 0.03758614
## Posts 0.005080669 1.000000000 0.92704775 -0.04887816 0.04452781
## Replies 0.015420672 0.927047753 1.00000000 -0.06179987 0.03541280
## Children -0.135839100 -0.048878158 -0.06179987 1.00000000 -0.10425455
## Likes 0.037586137 0.044527809 0.03541280 -0.10425455 1.00000000
## Events -0.001032848 -0.035005285 -0.04297586 0.02965843 0.05288971
## Friends -0.131606647 0.049095120 0.03043374 -0.16365981 0.23199526
## Events Friends
## Friend 0.031255583 0.09891109
## Age 0.005088027 -0.19857600
## Photos 0.069829097 0.24564233
## # of Tags 0.041615046 0.23814371
## Albums 0.043630034 0.22842387
## Gender -0.001032848 -0.13160665
## Posts -0.035005285 0.04909512
## Replies -0.042975858 0.03043374
## Children 0.029658429 -0.16365981
## Likes 0.052889711 0.23199526
## Events 1.000000000 0.06533578
## Friends 0.065335780 1.00000000
# Compute correlation matrix
cor_matrix <- cor(data_xlsx[, numerical_vars])
# Create a table of correlation coefficients
cor_table <- round(cor_matrix, 2)
# Print the correlation table
print(cor_table)
## Friend Age Photos # of Tags Albums Gender Emp Profile Cover
## Friend 1.00 -0.04 0.07 0.08 0.06 0.14 0.08 0.11 -0.02
## Age -0.04 1.00 -0.09 -0.13 -0.04 -0.05 0.16 -0.12 -0.05
## Photos 0.07 -0.09 1.00 0.53 0.79 -0.20 0.08 0.07 0.00
## # of Tags 0.08 -0.13 0.53 1.00 0.55 -0.15 0.08 0.07 0.05
## Albums 0.06 -0.04 0.79 0.55 1.00 -0.20 0.06 0.05 -0.04
## Gender 0.14 -0.05 -0.20 -0.15 -0.20 1.00 0.03 0.02 -0.06
## Emp 0.08 0.16 0.08 0.08 0.06 0.03 1.00 0.01 0.00
## Profile 0.11 -0.12 0.07 0.07 0.05 0.02 0.01 1.00 0.02
## Cover -0.02 -0.05 0.00 0.05 -0.04 -0.06 0.00 0.02 1.00
## Orientation -0.14 -0.08 0.00 0.00 -0.04 -0.06 0.03 -0.04 0.09
## Relationship -0.05 0.23 -0.02 0.00 -0.03 -0.07 0.13 -0.03 0.04
## Posts -0.15 -0.03 0.06 0.06 0.11 0.01 -0.01 0.05 -0.07
## Replies -0.13 -0.04 0.07 0.09 0.13 0.02 0.01 0.06 -0.04
## MidWest 0.06 -0.11 -0.04 0.05 0.01 0.04 0.01 0.04 -0.08
## Seast -0.05 0.01 0.07 0.00 0.07 -0.05 -0.02 0.00 0.05
## West -0.03 0.10 0.01 -0.01 -0.03 -0.02 0.06 -0.08 0.02
## Children -0.06 0.57 -0.10 -0.11 -0.08 -0.14 0.08 -0.17 -0.01
## Likes 0.16 -0.17 0.12 0.07 0.15 0.04 -0.09 0.06 -0.04
## Edu 0.17 0.02 0.00 -0.07 -0.01 0.00 0.00 0.03 -0.02
## Events 0.03 0.01 0.07 0.04 0.04 0.00 0.05 -0.02 -0.01
## USA -0.01 -0.09 0.01 0.09 0.09 -0.04 0.04 -0.02 -0.14
## Friends 0.10 -0.20 0.25 0.24 0.23 -0.13 -0.08 0.13 0.03
## Orientation Relationship Posts Replies MidWest Seast West
## Friend -0.14 -0.05 -0.15 -0.13 0.06 -0.05 -0.03
## Age -0.08 0.23 -0.03 -0.04 -0.11 0.01 0.10
## Photos 0.00 -0.02 0.06 0.07 -0.04 0.07 0.01
## # of Tags 0.00 0.00 0.06 0.09 0.05 0.00 -0.01
## Albums -0.04 -0.03 0.11 0.13 0.01 0.07 -0.03
## Gender -0.06 -0.07 0.01 0.02 0.04 -0.05 -0.02
## Emp 0.03 0.13 -0.01 0.01 0.01 -0.02 0.06
## Profile -0.04 -0.03 0.05 0.06 0.04 0.00 -0.08
## Cover 0.09 0.04 -0.07 -0.04 -0.08 0.05 0.02
## Orientation 1.00 0.06 0.03 0.03 0.00 0.03 0.03
## Relationship 0.06 1.00 0.03 0.00 -0.02 0.03 0.05
## Posts 0.03 0.03 1.00 0.93 0.06 -0.02 -0.05
## Replies 0.03 0.00 0.93 1.00 0.04 -0.01 -0.05
## MidWest 0.00 -0.02 0.06 0.04 1.00 -0.53 -0.53
## Seast 0.03 0.03 -0.02 -0.01 -0.53 1.00 -0.07
## West 0.03 0.05 -0.05 -0.05 -0.53 -0.07 1.00
## Children 0.03 0.19 -0.05 -0.06 -0.13 -0.01 0.13
## Likes -0.03 -0.06 0.04 0.04 0.00 0.03 -0.08
## Edu -0.14 -0.05 -0.11 -0.12 0.04 -0.04 -0.07
## Events 0.02 -0.02 -0.04 -0.04 -0.18 0.07 0.21
## USA 0.00 -0.01 0.07 0.06 0.45 0.06 -0.13
## Friends -0.03 -0.06 0.05 0.03 0.07 -0.02 -0.03
## Children Likes Edu Events USA Friends
## Friend -0.06 0.16 0.17 0.03 -0.01 0.10
## Age 0.57 -0.17 0.02 0.01 -0.09 -0.20
## Photos -0.10 0.12 0.00 0.07 0.01 0.25
## # of Tags -0.11 0.07 -0.07 0.04 0.09 0.24
## Albums -0.08 0.15 -0.01 0.04 0.09 0.23
## Gender -0.14 0.04 0.00 0.00 -0.04 -0.13
## Emp 0.08 -0.09 0.00 0.05 0.04 -0.08
## Profile -0.17 0.06 0.03 -0.02 -0.02 0.13
## Cover -0.01 -0.04 -0.02 -0.01 -0.14 0.03
## Orientation 0.03 -0.03 -0.14 0.02 0.00 -0.03
## Relationship 0.19 -0.06 -0.05 -0.02 -0.01 -0.06
## Posts -0.05 0.04 -0.11 -0.04 0.07 0.05
## Replies -0.06 0.04 -0.12 -0.04 0.06 0.03
## MidWest -0.13 0.00 0.04 -0.18 0.45 0.07
## Seast -0.01 0.03 -0.04 0.07 0.06 -0.02
## West 0.13 -0.08 -0.07 0.21 -0.13 -0.03
## Children 1.00 -0.10 0.02 0.03 -0.14 -0.16
## Likes -0.10 1.00 0.05 0.05 0.01 0.23
## Edu 0.02 0.05 1.00 -0.02 -0.01 -0.04
## Events 0.03 0.05 -0.02 1.00 -0.01 0.07
## USA -0.14 0.01 -0.01 -0.01 1.00 0.12
## Friends -0.16 0.23 -0.04 0.07 0.12 1.00
# Create a heatmap of the correlation matrix
corrplot(cor_matrix, method = "color", type = "upper", tl.cex = 0.8)
library(readxl)
library(corrplot)
library(ggplot2)
# Read the Excel file
data_xlsx <- read_excel("Facebook Friends (1).xlsx", sheet = 1)
# Identify numerical variables
numerical_vars <- sapply(data_xlsx, is.numeric)
# Identify non-binary numerical variables
non_binary_numerical_vars <- numerical_vars & sapply(data_xlsx, function(x) length(unique(x)) > 2)
# Extract non-binary numerical values
non_binary_numerical_vals <- data_xlsx[, non_binary_numerical_vars]
# Calculate correlation coefficients
cor_matrix <- cor(non_binary_numerical_vals)
# Display the correlation matrix
cor_matrix
## Friend Age Photos # of Tags Albums
## Friend 1.00000000 -0.040065749 0.07192247 0.08446608 0.05664016
## Age -0.04006575 1.000000000 -0.08576964 -0.12678370 -0.03619525
## Photos 0.07192247 -0.085769636 1.00000000 0.52953749 0.79480904
## # of Tags 0.08446608 -0.126783704 0.52953749 1.00000000 0.54972351
## Albums 0.05664016 -0.036195249 0.79480904 0.54972351 1.00000000
## Gender 0.13708770 -0.054127322 -0.20420963 -0.15461140 -0.19702834
## Posts -0.15405951 -0.028473891 0.06181539 0.06480031 0.11234141
## Replies -0.13207322 -0.043138690 0.07344995 0.08701351 0.12577223
## Children -0.05551170 0.572905558 -0.10157805 -0.11047158 -0.07783486
## Likes 0.15510418 -0.170365200 0.11933987 0.07462884 0.15355255
## Events 0.03125558 0.005088027 0.06982910 0.04161505 0.04363003
## Friends 0.09891109 -0.198576001 0.24564233 0.23814371 0.22842387
## Gender Posts Replies Children Likes
## Friend 0.137087700 -0.154059513 -0.13207322 -0.05551170 0.15510418
## Age -0.054127322 -0.028473891 -0.04313869 0.57290556 -0.17036520
## Photos -0.204209635 0.061815389 0.07344995 -0.10157805 0.11933987
## # of Tags -0.154611397 0.064800313 0.08701351 -0.11047158 0.07462884
## Albums -0.197028340 0.112341409 0.12577223 -0.07783486 0.15355255
## Gender 1.000000000 0.005080669 0.01542067 -0.13583910 0.03758614
## Posts 0.005080669 1.000000000 0.92704775 -0.04887816 0.04452781
## Replies 0.015420672 0.927047753 1.00000000 -0.06179987 0.03541280
## Children -0.135839100 -0.048878158 -0.06179987 1.00000000 -0.10425455
## Likes 0.037586137 0.044527809 0.03541280 -0.10425455 1.00000000
## Events -0.001032848 -0.035005285 -0.04297586 0.02965843 0.05288971
## Friends -0.131606647 0.049095120 0.03043374 -0.16365981 0.23199526
## Events Friends
## Friend 0.031255583 0.09891109
## Age 0.005088027 -0.19857600
## Photos 0.069829097 0.24564233
## # of Tags 0.041615046 0.23814371
## Albums 0.043630034 0.22842387
## Gender -0.001032848 -0.13160665
## Posts -0.035005285 0.04909512
## Replies -0.042975858 0.03043374
## Children 0.029658429 -0.16365981
## Likes 0.052889711 0.23199526
## Events 1.000000000 0.06533578
## Friends 0.065335780 1.00000000
# Compute correlation matrix
cor_matrix <- cor(data_xlsx[, numerical_vars])
# Create a table of correlation coefficients
cor_table <- round(cor_matrix, 2)
# Print the correlation table
print(cor_table)
## Friend Age Photos # of Tags Albums Gender Emp Profile Cover
## Friend 1.00 -0.04 0.07 0.08 0.06 0.14 0.08 0.11 -0.02
## Age -0.04 1.00 -0.09 -0.13 -0.04 -0.05 0.16 -0.12 -0.05
## Photos 0.07 -0.09 1.00 0.53 0.79 -0.20 0.08 0.07 0.00
## # of Tags 0.08 -0.13 0.53 1.00 0.55 -0.15 0.08 0.07 0.05
## Albums 0.06 -0.04 0.79 0.55 1.00 -0.20 0.06 0.05 -0.04
## Gender 0.14 -0.05 -0.20 -0.15 -0.20 1.00 0.03 0.02 -0.06
## Emp 0.08 0.16 0.08 0.08 0.06 0.03 1.00 0.01 0.00
## Profile 0.11 -0.12 0.07 0.07 0.05 0.02 0.01 1.00 0.02
## Cover -0.02 -0.05 0.00 0.05 -0.04 -0.06 0.00 0.02 1.00
## Orientation -0.14 -0.08 0.00 0.00 -0.04 -0.06 0.03 -0.04 0.09
## Relationship -0.05 0.23 -0.02 0.00 -0.03 -0.07 0.13 -0.03 0.04
## Posts -0.15 -0.03 0.06 0.06 0.11 0.01 -0.01 0.05 -0.07
## Replies -0.13 -0.04 0.07 0.09 0.13 0.02 0.01 0.06 -0.04
## MidWest 0.06 -0.11 -0.04 0.05 0.01 0.04 0.01 0.04 -0.08
## Seast -0.05 0.01 0.07 0.00 0.07 -0.05 -0.02 0.00 0.05
## West -0.03 0.10 0.01 -0.01 -0.03 -0.02 0.06 -0.08 0.02
## Children -0.06 0.57 -0.10 -0.11 -0.08 -0.14 0.08 -0.17 -0.01
## Likes 0.16 -0.17 0.12 0.07 0.15 0.04 -0.09 0.06 -0.04
## Edu 0.17 0.02 0.00 -0.07 -0.01 0.00 0.00 0.03 -0.02
## Events 0.03 0.01 0.07 0.04 0.04 0.00 0.05 -0.02 -0.01
## USA -0.01 -0.09 0.01 0.09 0.09 -0.04 0.04 -0.02 -0.14
## Friends 0.10 -0.20 0.25 0.24 0.23 -0.13 -0.08 0.13 0.03
## Orientation Relationship Posts Replies MidWest Seast West
## Friend -0.14 -0.05 -0.15 -0.13 0.06 -0.05 -0.03
## Age -0.08 0.23 -0.03 -0.04 -0.11 0.01 0.10
## Photos 0.00 -0.02 0.06 0.07 -0.04 0.07 0.01
## # of Tags 0.00 0.00 0.06 0.09 0.05 0.00 -0.01
## Albums -0.04 -0.03 0.11 0.13 0.01 0.07 -0.03
## Gender -0.06 -0.07 0.01 0.02 0.04 -0.05 -0.02
## Emp 0.03 0.13 -0.01 0.01 0.01 -0.02 0.06
## Profile -0.04 -0.03 0.05 0.06 0.04 0.00 -0.08
## Cover 0.09 0.04 -0.07 -0.04 -0.08 0.05 0.02
## Orientation 1.00 0.06 0.03 0.03 0.00 0.03 0.03
## Relationship 0.06 1.00 0.03 0.00 -0.02 0.03 0.05
## Posts 0.03 0.03 1.00 0.93 0.06 -0.02 -0.05
## Replies 0.03 0.00 0.93 1.00 0.04 -0.01 -0.05
## MidWest 0.00 -0.02 0.06 0.04 1.00 -0.53 -0.53
## Seast 0.03 0.03 -0.02 -0.01 -0.53 1.00 -0.07
## West 0.03 0.05 -0.05 -0.05 -0.53 -0.07 1.00
## Children 0.03 0.19 -0.05 -0.06 -0.13 -0.01 0.13
## Likes -0.03 -0.06 0.04 0.04 0.00 0.03 -0.08
## Edu -0.14 -0.05 -0.11 -0.12 0.04 -0.04 -0.07
## Events 0.02 -0.02 -0.04 -0.04 -0.18 0.07 0.21
## USA 0.00 -0.01 0.07 0.06 0.45 0.06 -0.13
## Friends -0.03 -0.06 0.05 0.03 0.07 -0.02 -0.03
## Children Likes Edu Events USA Friends
## Friend -0.06 0.16 0.17 0.03 -0.01 0.10
## Age 0.57 -0.17 0.02 0.01 -0.09 -0.20
## Photos -0.10 0.12 0.00 0.07 0.01 0.25
## # of Tags -0.11 0.07 -0.07 0.04 0.09 0.24
## Albums -0.08 0.15 -0.01 0.04 0.09 0.23
## Gender -0.14 0.04 0.00 0.00 -0.04 -0.13
## Emp 0.08 -0.09 0.00 0.05 0.04 -0.08
## Profile -0.17 0.06 0.03 -0.02 -0.02 0.13
## Cover -0.01 -0.04 -0.02 -0.01 -0.14 0.03
## Orientation 0.03 -0.03 -0.14 0.02 0.00 -0.03
## Relationship 0.19 -0.06 -0.05 -0.02 -0.01 -0.06
## Posts -0.05 0.04 -0.11 -0.04 0.07 0.05
## Replies -0.06 0.04 -0.12 -0.04 0.06 0.03
## MidWest -0.13 0.00 0.04 -0.18 0.45 0.07
## Seast -0.01 0.03 -0.04 0.07 0.06 -0.02
## West 0.13 -0.08 -0.07 0.21 -0.13 -0.03
## Children 1.00 -0.10 0.02 0.03 -0.14 -0.16
## Likes -0.10 1.00 0.05 0.05 0.01 0.23
## Edu 0.02 0.05 1.00 -0.02 -0.01 -0.04
## Events 0.03 0.05 -0.02 1.00 -0.01 0.07
## USA -0.14 0.01 -0.01 -0.01 1.00 0.12
## Friends -0.16 0.23 -0.04 0.07 0.12 1.00
# Create a heatmap of the correlation matrix
corrplot(cor_matrix, method = "color", type = "upper", tl.cex = 0.8)

## create scatter plots
# Identify numerical variables
numerical_vars <- sapply(data_xlsx, is.numeric)
# Identify non-binary numerical variables
non_binary_numerical_vars <- numerical_vars & sapply(data_xlsx, function(x) length(unique(x)) > 2)
# Create scatter plots for each column
for (var in names(data_xlsx)[non_binary_numerical_vars]) {
p <- ggplot(data_xlsx, aes(x = Friends, y = !!sym(var))) +
geom_point(size = 2) +
labs(x = "Friends", y = var) +
theme_minimal()
print(p)
}












## Correlation Analysis: Correlation analysis measures the statistical relationship between two variables. In this case, Pearson correlation coefficients are used, which quantify the strength and direction of the linear relationship between numerical variables.
## Heatmap: A heatmap is a graphical representation of data where the values are depicted using colors. In the context of correlation analysis, a heatmap visually represents the correlation matrix, where each cell is filled with a color that corresponds to the strength of the correlation coefficient.
## Value Charts vs. Table: Value charts, such as scatter plots, provide a visual representation of the relationship between variables, allowing for a better understanding of the data patterns and trends. On the other hand, the correlation table provides a concise summary of the correlation coefficients between variables, but it may not convey the full picture of the relationships.
# Check the column names in the dataset
colnames(data_xlsx)
## [1] "Friend" "Age" "Photos" "# of Tags" "Albums"
## [6] "Gender" "Emp" "Profile" "Cover" "Orientation"
## [11] "Relationship" "Posts" "Replies" "MidWest" "Seast"
## [16] "West" "Children" "Likes" "Edu" "Events"
## [21] "USA" "Friends"
# Update the column names if they differ
selected_vars <- c("Age", "Photos", "# of Tags", "Albums", "Posts", "Likes")
dependent_var <- "Friend"
# Subset the dataset with the selected variables
data_subset <- data_xlsx[, c(selected_vars, dependent_var)]
# Perform linear regression for each variable
models <- lapply(selected_vars, function(var) {
model <- lm(as.formula(paste0(dependent_var, " ~ .")), data = data_subset)
return(model)
})
# Evaluate the models and compare them
model_stats <- data.frame(
Variable = selected_vars,
R2 = sapply(models, function(model) summary(model)$r.squared),
Adjusted_R2 = sapply(models, function(model) summary(model)$adj.r.squared),
F_Value = sapply(models, function(model) summary(model)$fstatistic[1]),
p_Value = sapply(models, function(model) summary(model)$fstatistic[2])
)
# Print model statistics
print(model_stats)
## Variable R2 Adjusted_R2 F_Value p_Value
## 1 Age 0.05768933 0.04970364 7.224094 6
## 2 Photos 0.05768933 0.04970364 7.224094 6
## 3 # of Tags 0.05768933 0.04970364 7.224094 6
## 4 Albums 0.05768933 0.04970364 7.224094 6
## 5 Posts 0.05768933 0.04970364 7.224094 6
## 6 Likes 0.05768933 0.04970364 7.224094 6
## To determine which model is better, you can compare the adjusted R-squared values. The adjusted R-squared tells you how well the predictors explain the variation in the dependent variable. A higher adjusted R-squared means a better fit of the model to the data.
## To know if a model is statistically significant, you can look at the p-value of the F-statistic. If the p-value is small (usually less than 0.05), it means the model is significant. This suggests that at least one predictor has a significant effect on the dependent variable.
## The key indicator to consider when comparing models is the adjusted R-squared. It shows how much of the variation in the dependent variable is explained by the predictors. A higher adjusted R-squared indicates a better model fit. It's important because it balances the model's accuracy with its complexity, avoiding the inclusion of unnecessary predictors.
## By comparing adjusted R-squared values and checking the statistical significance, you can determine which model is better at explaining the relationship between the predictors and the dependent variable.
# Select the relevant variables for analysis
selected_vars <- c("Photos", "# of Tags", "Albums")
# Create a subset of the data with the selected variables
data_subset <- data_xlsx[, c(selected_vars, "Friend")]
# Perform multivariable linear regression
model <- lm(`Friend` ~ ., data = data_subset)
# Print the regression summary
summary(model)
##
## Call:
## lm(formula = Friend ~ ., data = data_subset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -374.46 -169.19 1.67 174.61 369.13
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 346.805150 10.323229 33.595 <2e-16 ***
## Photos 0.009093 0.010219 0.890 0.374
## `# of Tags` 0.019781 0.013029 1.518 0.129
## Albums -0.234749 0.583413 -0.402 0.688
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 206.1 on 711 degrees of freedom
## Multiple R-squared: 0.008388, Adjusted R-squared: 0.004204
## F-statistic: 2.005 on 3 and 711 DF, p-value: 0.1119
## If the multivariable model explains more of the variation in the number of friends compared to the univariate models, it means that considering multiple factors together improves our ability to predict the number of friends. This improvement suggests that the combined effect of multiple predictors provides a better understanding of the relationship with the number of friends.
## If the multivariable model shows a greater ability to explain the variation in the number of friends than the univariate models, it indicates that considering multiple factors simultaneously enhances the model's performance in predicting the number of friends.