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
The tables above provides the distributions of respondents in terms of sex, year level, and strand. It can be seen that there are 51 females and 29 males; 40 of which are from grade 11 and 40 from grade 12. Moreover, an equal distribution of respondents was done in terms of strand which coincides to a 20 students from each strand.
Call:
lm(formula = `Social Well-being` ~ `Mental Aspect` + `Emotional Aspect`,
data = Data)
Coefficients:
(Intercept) `Mental Aspect` `Emotional Aspect`
0.94061 0.63402 0.01171
From this, we may deduce that the data fail to satisfy the two assumptions – Linearity and Homogeneity of Variance.
`summarise()` has grouped output by 'Sex'. You can override using the `.groups`
argument.
Attaching package: 'rstatix'
The following object is masked from 'package:stats':
filter
The mean for male and female is 2.917 and 3.008, respectively.
The above graph shows the plotting of data by sex, which contains two sexes – male and female.
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ lubridate 1.9.3 ✔ tibble 3.2.1
✔ purrr 1.0.2 ✔ tidyr 1.3.1
✔ readr 2.1.5
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ rstatix::filter() masks dplyr::filter(), stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Warning: The following aesthetics were dropped during statistical transformation: fill
ℹ This can happen when ggplot fails to infer the correct grouping structure in
the data.
ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
variable into a factor?
It clearly shows that there is no significant difference between the social behavior of the student in terms of mental aspect when grouped according to their sex.
Loading required package: carData
Attaching package: 'car'
The following object is masked from 'package:purrr':
some
The following object is masked from 'package:dplyr':
recode
The histogram resembles a bell curve as seen above, means that the residuals have a normal distribution. Moreover, the points in the QQ-plots roughly follow the straight line, with the majority of them falling within the confidence bands. This also indicates that residuals have a normal distribution.
Shapiro-Wilk normality test
data: res_aov$residuals
W = 0.98376, p-value = 0.4057
The Shapiro-Wilk p-value = 0.4057 on the residuals is greater than the usual significance level of 0.05. Thus, we fail to reject the hypothesis that residuals have a normal distribution.
Warning in leveneTest.default(y = y, group = group, ...): group coerced to
factor.
Levene's Test for Homogeneity of Variance (center = median)
Df F value Pr(>F)
group 1 0.298 0.5867
78
The p-value is greater than the 0.05 level of significance. Thus, the homogeneity assumption of the variance is met.
Welch Two Sample t-test
data: a and b
t = -0.65375, df = 37.901, p-value = 0.5172
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-0.3581283 0.1832983
sample estimates:
mean of x mean of y
2.916667 3.004082
Since the p-value is larger than 0.05, we fail to reject the null hypothesis, that is, there is no significant difference between the social behavior in terms of mental aspect when grouped according to sex.
`summarise()` has grouped output by 'Sex'. You can override using the `.groups`
argument.
# A tibble: 19 × 3
# Groups: Sex [2]
Sex `Emotional Aspect` count
<fct> <dbl> <int>
1 Female 2.2 4
2 Female 2.6 4
3 Female 2.8 1
4 Female 3 12
5 Female 3.2 5
6 Female 3.4 2
7 Female 3.6 9
8 Female 3.8 4
9 Female 4 10
10 Male 1.8 1
11 Male 2 1
12 Male 2.4 1
13 Male 2.6 4
14 Male 3 6
15 Male 3.2 3
16 Male 3.4 2
17 Male 3.6 5
18 Male 3.8 3
19 Male 4 3
The mean for male and female is 3.186 and 3.302, respectively.
The above graph shows the plotting of data by sex, which contains two sexes – male and female.
Warning: The following aesthetics were dropped during statistical transformation: fill
ℹ This can happen when ggplot fails to infer the correct grouping structure in
the data.
ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
variable into a factor?
The histogram does not resemble a bell curve as seen above, means that the residuals do not have a normal distribution. Moreover, the points in the QQ-plots roughly follow the straight line, with the majority of them falling within the confidence bands. However, this does not guarantee that residuals follow a normal distribution since when based on the diagram on the left, it is the exact opposite of it. Thus, it is more convenient to observe the two.
Shapiro-Wilk normality test
data: res_aov$residuals
W = 0.9473, p-value = 0.002421
The Shapiro-Wilk p-value = 0.002421 on the residuals is less than the usual significance level of 0.05. Thus, we reject the hypothesis that residuals have a normal distribution.
Warning in leveneTest.default(y = y, group = group, ...): group coerced to
factor.
Levene's Test for Homogeneity of Variance (center = median)
Df F value Pr(>F)
group 1 0.0072 0.9326
78
The p-value is greater than the 0.05 level of significance. Thus, the homogeneity assumption of the variance is met.
Wilcoxon rank sum test with continuity correction
data: c and d
W = 660, p-value = 0.4236
alternative hypothesis: true location shift is not equal to 0
Since the p-value= 0.4236 is greater than 0.05, we fail to reject the null hypothesis. Hence, there is no significant difference between the social behavior of the students in terms of emotional aspect when grouped according to their sex.
`summarise()` has grouped output by 'Sex'. You can override using the `.groups`
argument.
# A tibble: 23 × 3
# Groups: Sex [2]
Sex `Social Well-being` count
<fct> <dbl> <int>
1 Female 1.4 1
2 Female 1.8 2
3 Female 2 2
4 Female 2.2 2
5 Female 2.4 3
6 Female 2.6 4
7 Female 2.8 5
8 Female 3 14
9 Female 3.2 9
10 Female 3.4 5
# ℹ 13 more rows
The mean for male and female is 2.828 and 2.886, respectively.
The above graph shows the plotting of data by sex, which contains two sexes – male and female.
The histogram does not resemble a bell curve as seen above, means that the residuals do not have a normal distribution. Moreover, the points in the QQ-plots roughly follow the straight line, with the majority of them falling within the confidence bands. This also indicates that residuals have a less chances that they follow a normal distribution.
Shapiro-Wilk normality test
data: res_aov$residuals
W = 0.95053, p-value = 0.003695
The Shapiro-Wilk p-value = 0.003695 on the residuals is less than the usual significance level of 0.05. Thus, we reject the hypothesis that residuals have a normal distribution.
Warning in leveneTest.default(y = y, group = group, ...): group coerced to
factor.
Levene's Test for Homogeneity of Variance (center = median)
Df F value Pr(>F)
group 1 4.2087 0.04357 *
78
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The p-value is less than the 0.05 level of significance. Thus, the homogeneity assumption of the variance is not met.
Wilcoxon rank sum test with continuity correction
data: e and f
W = 721, p-value = 0.8558
alternative hypothesis: true location shift is not equal to 0
Since the p-value= 0.8558 is greater than 0.05, we fail to reject the null hypothesis. Hence, there is no significant difference between the social behavior of the students in terms of social well-being when grouped according to their sex.
`summarise()` has grouped output by 'Strand'. You can override using the
`.groups` argument.
# A tibble: 34 × 3
# Groups: Strand [4]
Strand `Mental Aspect` count
<fct> <dbl> <int>
1 ABM 2.2 1
2 ABM 2.6 4
3 ABM 2.8 1
4 ABM 3 2
5 ABM 3.2 5
6 ABM 3.4 3
7 ABM 3.6 2
8 ABM 3.8 2
9 GAS 1.4 1
10 GAS 2 1
# ℹ 24 more rows
The mean for ABM, GAS, HUMSS, STEM is 3.12, 2.84, 3.06, and 2.88, respectively.
The above graph shows the plotting of data by strand: ABM, GAS, HUMSS, STEM.
Warning: The following aesthetics were dropped during statistical transformation: fill
ℹ This can happen when ggplot fails to infer the correct grouping structure in
the data.
ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
variable into a factor?
It clearly shows that there is a difference between the social behavior of the student in terms of mental aspect when grouped according to their strand. However, this does not assure anyone that the difference is significant.
The histogram resemble a bell curve as seen above, means that the residuals have a normal distribution. Moreover, the points in the QQ-plots roughly follow the straight line, with the majority of them falling within the confidence bands. This also indicates that residuals have normal distribution.
Shapiro-Wilk normality test
data: res_aov$residuals
W = 0.98428, p-value = 0.4338
The Shapiro-Wilk p-value = 0.4338 on the residuals is greater than the usual significance level of 0.05. Thus, we fail to reject the hypothesis that residuals have a normal distribution.
Warning in leveneTest.default(y = y, group = group, ...): group coerced to
factor.
Levene's Test for Homogeneity of Variance (center = median)
Df F value Pr(>F)
group 3 0.5675 0.6381
76
The p-value is greater than the 0.05 level of significance. Thus, the homogeneity assumption of the variance is met.
Df Sum Sq Mean Sq F value Pr(>F)
Strand 3 1.11 0.3700 1.601 0.196
Residuals 76 17.56 0.2311
Since p-value = 0.196 > 0.05, we fail to reject the null hypothesis, that is, the social behavior in terms of mental aspect do not differ when grouped according to strand.
`summarise()` has grouped output by 'Strand'. You can override using the
`.groups` argument.
# A tibble: 31 × 3
# Groups: Strand [4]
Strand `Emotional Aspect` count
<fct> <dbl> <int>
1 ABM 2.6 1
2 ABM 2.8 1
3 ABM 3 3
4 ABM 3.2 2
5 ABM 3.4 1
6 ABM 3.6 6
7 ABM 3.8 2
8 ABM 4 4
9 GAS 1.8 1
10 GAS 2 1
# ℹ 21 more rows
The mean for ABM, GAS, HUMSS, STEM is 3.47, 3.00, 3.30, and 3.27, respectively.
Warning: The following aesthetics were dropped during statistical transformation: fill
ℹ This can happen when ggplot fails to infer the correct grouping structure in
the data.
ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
variable into a factor?
It clearly shows that there is a difference between the social behavior of the student in terms of emotional aspect when grouped according to their strand. However, illustrations does only give overviews of the data. It does not guarantee the exact result.
The histogram does not resemble a bell curve as seen above, means that the residuals have a normal distribution. Moreover, the points in the QQ-plots roughly follow the straight line, with the majority of them falling within the confidence bands. However, we are assured that the data follows a normal distribution when both diagrams have the same output.
Shapiro-Wilk normality test
data: res_aov$residuals
W = 0.96013, p-value = 0.01371
The Shapiro-Wilk p-value = 0.01371 on the residuals is less than the usual significance level of 0.05. Thus, we reject the hypothesis that residuals have a normal distribution.
Warning in leveneTest.default(y = y, group = group, ...): group coerced to
factor.
Levene's Test for Homogeneity of Variance (center = median)
Df F value Pr(>F)
group 3 2.7128 0.05074 .
76
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The p-value is greater than the 0.05 level of significance. Thus, the homogeneity assumption of the variance is met.
# A tibble: 4 × 11
Strand variable n min max median iqr mean sd se ci
<fct> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 ABM Emotional Aspect 20 2.6 4 3.6 0.65 3.47 0.427 0.095 0.2
2 GAS Emotional Aspect 20 1.8 4 3.1 1.4 3 0.705 0.158 0.33
3 HUMSS Emotional Aspect 20 2.6 4 3.2 0.8 3.3 0.517 0.116 0.242
4 STEM Emotional Aspect 20 2.6 4 3.1 0.65 3.27 0.487 0.109 0.228
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Emotional Aspect 80 4.98 3 0.173 Kruskal-Wallis
Based on the p-value, no significant difference was observed between the group pairs.
# A tibble: 6 × 9
.y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
* <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
1 Emotional Aspect ABM GAS 20 20 -2.22 0.0264 0.158 ns
2 Emotional Aspect ABM HUMSS 20 20 -0.995 0.320 1 ns
3 Emotional Aspect ABM STEM 20 20 -1.21 0.228 1 ns
4 Emotional Aspect GAS HUMSS 20 20 1.23 0.220 1 ns
5 Emotional Aspect GAS STEM 20 20 1.02 0.310 1 ns
6 Emotional Aspect HUMSS STEM 20 20 -0.210 0.834 1 ns
Based on the pairwise comparison, we can only observe a significant difference between ABM and GAS in terms of emotional aspect.
`summarise()` has grouped output by 'Strand'. You can override using the
`.groups` argument.
# A tibble: 40 × 3
# Groups: Strand [4]
Strand `Social Well-being` count
<fct> <dbl> <int>
1 ABM 1.8 1
2 ABM 2.2 3
3 ABM 2.4 1
4 ABM 2.6 1
5 ABM 2.8 2
6 ABM 3 4
7 ABM 3.2 3
8 ABM 3.4 2
9 ABM 3.6 3
10 GAS 1.4 1
# ℹ 30 more rows
The mean for ABM, GAS, HUMSS, STEM is 2.91, 2.90, 2.80, and 2.85, respectively.
The histogram does not resemble a bell curve as seen above, means that the residuals have a normal distribution. Moreover, the points in the QQ-plots roughly follow the straight line, with the majority of them falling within the confidence bands. However, we are assured that the data follows a normal distribution when both diagrams have the same output.
Shapiro-Wilk normality test
data: res_aov$residuals
W = 0.95414, p-value = 0.005997
The Shapiro-Wilk p-value = 0.005997 on the residuals is less than the usual significance level of 0.05. Thus, we reject the hypothesis that residuals have a normal distribution.
Warning in leveneTest.default(y = y, group = group, ...): group coerced to
factor.
Levene's Test for Homogeneity of Variance (center = median)
Df F value Pr(>F)
group 3 1.2442 0.2997
76
The p-value is greater than the 0.05 level of significance. Thus, the homogeneity assumption of the variance is met.
# A tibble: 4 × 11
Strand variable n min max median iqr mean sd se ci
<fct> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 ABM Social Well-bei… 20 1.8 3.6 3 0.7 2.91 0.529 0.118 0.248
2 GAS Social Well-bei… 20 1.4 3.6 3 0.45 2.9 0.537 0.12 0.251
3 HUMSS Social Well-bei… 20 1.4 4 2.8 0.9 2.8 0.711 0.159 0.333
4 STEM Social Well-bei… 20 1.6 3.6 3 0.6 2.85 0.51 0.114 0.239
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Social Well-being 80 0.487 3 0.922 Kruskal-Wallis
Based on the p-value, no significant difference was observed between the group pairs.
# A tibble: 6 × 9
.y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
* <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
1 Social Well-being ABM GAS 20 20 0.0480 0.962 1 ns
2 Social Well-being ABM HUMSS 20 20 -0.511 0.609 1 ns
3 Social Well-being ABM STEM 20 20 -0.415 0.678 1 ns
4 Social Well-being GAS HUMSS 20 20 -0.559 0.576 1 ns
5 Social Well-being GAS STEM 20 20 -0.463 0.643 1 ns
6 Social Well-being HUMSS STEM 20 20 0.0961 0.923 1 ns
Based on the pairwise comparison, no significant difference was observed.
Shapiro-Wilk normality test
data: Data1$`Scores in terms of effects of cyberbullying`
W = 0.96712, p-value = 2.422e-05
Since p-value = 2.422e-05 < 0.05, it is conclusive that we reject the null hypothesis. That is, we cannot assume normality.
Warning in leveneTest.default(y = y, group = group, ...): group coerced to
factor.
Levene's Test for Homogeneity of Variance (center = median)
Df F value Pr(>F)
group 2 1.3907 0.2509
237
The p-value is greater than the 0.05 level of significance. Thus, the homogeneity assumption of the variance is met.
Attaching package: 'gplots'
The following object is masked from 'package:stats':
lowess
Warning in plot.xy(xy.coords(x, y), type = type, ...): "frame" is not a
graphical parameter
Warning in axis(1, at = 1:length(means), labels = legends, ...): "frame" is not
a graphical parameter
Warning in plot.xy(xy.coords(x, y), type = type, ...): "frame" is not a
graphical parameter
# A tibble: 3 × 11
Variables variable n min max median iqr mean sd se ci
<fct> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 Mental Aspect Scores … 80 1.4 4 3 0.6 2.98 0.486 0.054 0.108
2 Emotional Asp… Scores … 80 1.8 4 3.2 0.65 3.26 0.56 0.063 0.125
3 Social Well-b… Scores … 80 1.4 4 3 0.6 2.86 0.568 0.064 0.126
The mean of mental aspect, emotional aspect, and social well-being is 2.975, 3.260, 2.865, respectively.
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Scores in terms of effects of cyberbully… 240 18.9 2 7.85e-5 Krusk…
Based on the p-value, there is a significant difference was observed between the group pairs.
# A tibble: 3 × 9
.y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
* <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
1 Scores in te… Menta… Emoti… 80 80 3.38 7.25e-4 2.18e-3 **
2 Scores in te… Menta… Socia… 80 80 -0.679 4.97e-1 1 e+0 ns
3 Scores in te… Emoti… Socia… 80 80 -4.06 4.94e-5 1.48e-4 ***
The difference between mental aspect and social well-being is the most significant.
Based on the provided output above, it can be seen the cyberbullying have the most significant impact to the students’ behavior in terms of emotional aspect.