a. Learners’ Dimension
library(ggplot2)
Warning: package 'ggplot2' was built under R version 4.2.2
library(performance)
Warning: package 'performance' was built under R version 4.2.2
library(visreg)
Warning: package 'visreg' was built under R version 4.2.2
i) Attitude of the learner towards FLS (Provide the mean
score of columns J to O)
u <- mean(Dataexam$`Attitude of the learner towards FLS [1. I feel that using the flexible learning system (FLS) is a good idea.]`)
u
[1] 3.016779
v <- mean(Dataexam$`Attitude of the learner towards FLS [2. I feel that it is desirable to use the FLS.]`)
v
[1] 2.855705
w <- mean(Dataexam$`Attitude of the learner towards FLS [3. I feel that the FLS makes learning easier.]`)
w
[1] 2.483221
x <- mean(Dataexam$`Attitude of the learner towards FLS [4. I have a generally favorable attitude toward the FLS.]`)
x
[1] 2.765101
y <- mean(Dataexam$`Attitude of the learner towards FLS [5. I feel that I can learn actively in the FLS setup.]`)
y
[1] 2.402685
z <- mean(Dataexam$LDAttitude)
z
[1] 2.704698
dat <- Dataexam
ggplot(dat, aes(x = LDAttitude, y = GWA)) +
geom_point() +
labs(
y = "General Weighted Average",
x = "Attitude of the Learners"
) +
theme_minimal()

model <- lm(GWA ~ LDAttitude, data = dat)
model
Call:
lm(formula = GWA ~ LDAttitude, data = dat)
Coefficients:
(Intercept) LDAttitude
1.66034 -0.02908
summary(model)
Call:
lm(formula = GWA ~ LDAttitude, data = dat)
Residuals:
Min 1Q Median 3Q Max
-0.41418 -0.16639 -0.03046 0.12689 1.11874
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.66034 0.04386 37.856 <2e-16 ***
LDAttitude -0.02908 0.01548 -1.878 0.0614 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.2249 on 296 degrees of freedom
Multiple R-squared: 0.01177, Adjusted R-squared: 0.008435
F-statistic: 3.527 on 1 and 296 DF, p-value: 0.06137
The intercept 1.66034 indicates that, for a hypothetical Attitude of the Learners which is 0, we can expect, on average, a General Weighted Average of 1.66034. The slope -0.02908 indicates that there is a negative relationship between the General Weighted Average and Attitude of the Learners. But more importantly, a slope of -0.02908 means that, for an increase of one unit in the Attitude of the Learners, the number of General Weighted Average decreases, on average, by 0.02908 units.
Since the p-value = 0.0614 > 0.05 so we fail reject the null hypothesis at the significance level α=5%. We therefore conclude that there is no significant relationship between the General Weighted Average and Attitude of the Learners.
check_model(model)

visreg(model)

ii) Mental Health (Provide the mean score of Columns P, Q,
R, X, and Y)
a <- mean(Dataexam$`Mental Health [1. I often feel nervous, anxious, or on edge during the flexible learning system (FLS).]`)
a
[1] 1.942953
b <- mean(Dataexam$`Mental Health [2. I often feel not being able to stop or control worrying during the FLS.]`)
b
[1] 1.979866
c <- mean(Dataexam$`Mental Health [3. I often feel so restless that it’s hard to sit still during the FLS.]`)
c
[1] 2.020134
d <- mean(Dataexam$`Mental Health [4. I often feel active and in good spirits during the FLS.]`)
d
[1] 2.828859
e <- mean(Dataexam$`Mental Health [4. I often feel active and in good spirits during the FLS.]`)
e
[1] 2.828859
f <- mean(Dataexam$`Mental Health [5. My daily life has been filled with things that interest me during the FLS.]`)
f
[1] 2.805369
g <- mean(Dataexam$LDMental)
g
[1] 3.538255
dat1 <- Dataexam
ggplot(dat1, aes(x = LDMental, y = GWA)) +
geom_point() +
labs(
y = "General Weighted Average",
x = "Mental Health of the Learners"
) +
theme_minimal()

model1 <- lm(GWA ~ LDMental, data = dat1)
model1
Call:
lm(formula = GWA ~ LDMental, data = dat1)
Coefficients:
(Intercept) LDMental
1.51719 0.01823
summary(model1)
Call:
lm(formula = GWA ~ LDMental, data = dat1)
Residuals:
Min 1Q Median 3Q Max
-0.39376 -0.16239 -0.03346 0.13131 1.16718
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.51719 0.07384 20.548 <2e-16 ***
LDMental 0.01823 0.02054 0.888 0.375
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.2259 on 296 degrees of freedom
Multiple R-squared: 0.002655, Adjusted R-squared: -0.0007148
F-statistic: 0.7879 on 1 and 296 DF, p-value: 0.3755
The intercept 1.51719 indicates that, for a hypothetical Mental health of the Learners which is 0, we can expect, on average, a General Weighted Average of 1.51719 . The slope 0.01823 indicates that there is a positive relationship between the General Weighted Average and Mental Health of the Learners. But more importantly, a slope of 0.01823 means that, for an increase of one unit in the Mental Health of the Learners, the number of General Weighted Average increases, on average, by 0.01823 units.
Since the p-value = 0.375 > 0.05 so we fail reject the null hypothesis at the significance level α=5%. We therefore conclude that there is no significant relationship between the General Weighted Average and Attitude of the Learners.
check_model(model1)

visreg(model1)
