library(rmarkdown)
library(dplyr)
Warning: package 'dplyr' was built under R version 4.2.1

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
library(readxl)
Dataexam <- read_excel("D:/Winelyn/Dataexam.xlsx")
New names:
• `` -> `...1`
• `` -> `...22`
• `` -> `...23`
• `DDP` -> `DDP...75`
• `DDP` -> `DDP...82`
paged_table(Dataexam)

Objectives of the Study

The purpose of this research is to examine the impact of the perceived effectiveness of the Flexible Learning System (FLS) towards the academic performance of Central Mindanao University Students during COVID-19.

Specifically, the paper aims to: 

1. Determine the group of respondents in terms of:

a. Gadget used

Winny1 <- Dataexam%>%
  group_by(`Devices primarily used by students for their online classes.`)%>%
  summarise(count=n())%>%
  mutate(Percentage =round((count/sum(count)*100),2))
paged_table(Winny1)

b. Internet connectivity

Winny2 <- Dataexam%>%
  group_by(`Internet connectivity`)%>%
  summarise(count=n())%>%
  mutate(Percentage =round((count/sum(count)*100),2))
paged_table(Winny2)

c. Year level

Winny3 <- Dataexam%>%
  group_by(`Year Level`)%>%
  summarise(count=n())%>%
  mutate(Percentage =round((count/sum(count)*100),2))
paged_table(Winny3)

d. Gender

Winny4 <- Dataexam%>%
  group_by(Gender)%>%
  summarise(count=n())%>%
  mutate(Percentage =round((count/sum(count)*100),2))
paged_table(Winny4)

2. Determine the perceived effectiveness of FLS in terms of:

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)

3. Determine the relationship between the perceived effectiveness of FLS towards the academic performance of CMU students.

  Dependent Variable: Column “DV” 
  Independent Variables: Column “AM”, Column “BB”, Column “BQ”, and Column “CF”
  
model2 <- lm(GWA ~ Dataexam$LD + Dataexam$ID + Dataexam$CD + Dataexam$DD,
  data = Dataexam
)
summary(model2)

Call:
lm(formula = GWA ~ Dataexam$LD + Dataexam$ID + Dataexam$CD + 
    Dataexam$DD, data = Dataexam)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.41212 -0.16709 -0.04072  0.12679  1.14108 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept)  1.708347   0.091216  18.729   <2e-16 ***
Dataexam$LD -0.032404   0.033657  -0.963    0.336    
Dataexam$ID -0.007099   0.023529  -0.302    0.763    
Dataexam$CD  0.030347   0.034165   0.888    0.375    
Dataexam$DD -0.030337   0.035991  -0.843    0.400    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.2263 on 293 degrees of freedom
Multiple R-squared:  0.009546,  Adjusted R-squared:  -0.003975 
F-statistic: 0.706 on 4 and 293 DF,  p-value: 0.5884

3.1 Which of the independent variables significantly predicts the dependent variable?

Hence, the independent variable, Column AM(LD) has the coefficient with the largest absolute value which significantly predicts the dependent variable, Column DV. This measure suggests that Column AM(LD) is the most important independent variable in the regression model.

3.2 Provide the coefficient of the independent variables.

check_model(model2)
Warning: Using `$` in model formulas can produce unexpected results. Specify your
  model using the `data` argument instead.
  Try: GWA ~ LD + ID + CD + DD,
  data = Dataexam

Coefficients: Estimate
Column AM (LD) -0.032404
Column BB (ID) -0.007099
Column BQ (CD) 0.030347
Column CF (DD) -0.030337

3.3 Can we conclude that the model is better than a model having the intercept alone?

As shown in the above results, it shows that the model is better than a model with only the intercept because at least one coefficient β is significantly different from 0 with a p -value = 0.5884. It means that none of the variables we selected help in explaining the dependent variable. In other words, we should completely forget about this model because it cannot do better than simply taking the mean of the dependent variable.