library(ggpubr)
ggscatter( data = age, x = “age”, y = “education”, add = “reg.line”, xlab = “Age”, ylab = “Education”
# The relationship is linear.
# The relationship is positive.
# The relationship is moderate.
# There are outliers.
mean(age\(age) sd(age\)age) median(age$age)
mean(age\(education) sd(age\)education) median(age$education)
hist(age$age, main = “Age”, breaks = 20, col = “lightblue”, border = “white”, cex.main = 1, cex.axis = 1, cex.lab = 1)
hist(age$education, main = “Education”, breaks = 20, col = “lightcoral”, border = “white”, cex.main = 1, cex.axis = 1, cex.lab = 1)
#Variable 1: Age #The first variable looks normally distributed. #The data is symmetrical. #The data has a proper bell curve.
#Variable 2: USD #The second variable looks normally distributed. #The data is symmetrical. #The data has a proper bell curve.
shapiro.test(age\(age) shapiro.test(age\)education)
# Variable 1: Age # The first variable is normally distributed (p = .55).
# Variable 2: USD # The second variable is normally distributed (p = .437).