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 60 females and 50 males; 30 of which are from ABM, 20 from GAS, 40 from HUMSS, and 20 from STEM.
Call:
lm(formula = `Social Interdependence` ~ `Students Behavior` +
`Cognitive Development`, data = Data)
Coefficients:
(Intercept) `Students Behavior` `Cognitive Development`
0.6553 0.5459 0.2762
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 female and male is 3.233 and 3.280, 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 difference on the variable Social Interdependence when grouped according to their sex. However, we still need to check the significance of this difference.
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 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.89378, p-value = 2.586e-07
The Shapiro-Wilk p-value = 2.586e-07 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 2.289 0.1332
108
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
data: a and b
W = 1708.5, p-value = 0.1994
alternative hypothesis: true location shift is not equal to 0
Since the p-value is larger than 0.05, we fail to reject the null hypothesis, that is, there is no significant difference on the variable social interdependence when grouped according to sex.
`summarise()` has grouped output by 'Sex'. You can override using the `.groups`
argument.
The mean for female and male is 3.14 and 3.20, 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?
It clearly shows that there is difference on the variable Students Behavior when grouped according to their sex. However, we still need to check the significance of this difference.
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.92985, p-value = 2.113e-05
The Shapiro-Wilk p-value = 2.113e-05 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.9889 0.3222
108
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
data: c and d
W = 1754.5, p-value = 0.1186
alternative hypothesis: true location shift is not equal to 0
Since the p-value is larger than 0.05, we fail to reject the null hypothesis, that is, there is no significant difference on the variable students behavior when grouped according to sex.
`summarise()` has grouped output by 'Sex'. You can override using the `.groups`
argument.
The mean for female and male is 3.16 and 3.14, 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?
It clearly shows that there is difference on the variable Cognitive Development when grouped according to their sex. However, we still need to check the significance of this difference.
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.96311, p-value = 0.003891
The Shapiro-Wilk p-value = 0.003891 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 9.4355 0.002693 **
108
---
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
data: e and f
W = 1547, p-value = 0.7736
alternative hypothesis: true location shift is not equal to 0
Since the p-value is larger than 0.05, we fail to reject the null hypothesis, that is, there is no significant difference on the variable cognitive development when grouped according to sex.
Shapiro-Wilk normality test
data: Data$`Social Interdependence`
W = 0.88254, p-value = 7.85e-08
Since p-value = 7.85e-08 < 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 3 1.3817 0.2524
106
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: 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 STEM Social Interdep… 20 3 4 3.4 0.45 3.44 0.347 0.078 0.162
2 ABM Social Interdep… 30 2.6 4 3.1 0.4 3.23 0.413 0.075 0.154
3 HUMSS Social Interdep… 40 1.2 4 3.2 0.6 3.24 0.53 0.084 0.169
4 GAS Social Interdep… 20 2.6 4 3 0.2 3.15 0.324 0.072 0.151
The mean of STEM, ABM, HUMSS, and GAS is 3.440, 3.227, 3.235, and 3.150, respectively.
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Social Interdependence 110 8.01 3 0.0457 Kruskal-Wallis
Based on the p-value, there is 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 Interd… STEM ABM 20 30 -2.19 0.0285 0.171 ns
2 Social Interd… STEM HUMSS 20 40 -1.53 0.126 0.753 ns
3 Social Interd… STEM GAS 20 20 -2.65 0.00804 0.0482 *
4 Social Interd… ABM HUMSS 30 40 0.881 0.379 1 ns
5 Social Interd… ABM GAS 30 20 -0.714 0.475 1 ns
6 Social Interd… HUMSS GAS 40 20 -1.53 0.126 0.758 ns
There is significant difference between STEM and ABM so with STEM and GAS.
Shapiro-Wilk normality test
data: Data$`Students Behavior`
W = 0.92107, p-value = 6.572e-06
Since p-value = 6.572e-06 < 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 3 1.6285 0.1872
106
The p-value is greater than the 0.05 level of significance. Thus, the homogeneity assumption of the variance is met.
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: 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 STEM Students Behavi… 20 3 4 3.2 0.25 3.28 0.321 0.072 0.15
2 ABM Students Behavi… 30 2.2 4 3 0.55 3.18 0.45 0.082 0.168
3 HUMSS Students Behavi… 40 1.6 4 3.2 0.4 3.16 0.543 0.086 0.174
4 GAS Students Behavi… 20 2.4 4 3 0.25 3.06 0.395 0.088 0.185
The mean of STEM, ABM, HUMSS, and GAS is 3.280, 3.180, 3.155, and 3.060, respectively.
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Students Behavior 110 5.72 3 0.126 Kruskal-Wallis
Based on the p-value, there is 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 Students Behavi… STEM ABM 20 30 -1.28 0.201 1 ns
2 Students Behavi… STEM HUMSS 20 40 -0.928 0.353 1 ns
3 Students Behavi… STEM GAS 20 20 -2.32 0.0202 0.121 ns
4 Students Behavi… ABM HUMSS 30 40 0.477 0.633 1 ns
5 Students Behavi… ABM GAS 30 20 -1.26 0.206 1 ns
6 Students Behavi… HUMSS GAS 40 20 -1.75 0.0796 0.478 ns
There is significant difference between STEM and GAS.
Shapiro-Wilk normality test
data: Data$`Cognitive Development`
W = 0.95786, p-value = 0.001547
Since p-value = 0.001547 < 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 3 0.2582 0.8553
106
The p-value is greater than the 0.05 level of significance. Thus, the homogeneity assumption of the variance is met.
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: 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 STEM Cognitive Devel… 20 2.2 4 3.3 0.4 3.23 0.417 0.093 0.195
2 ABM Cognitive Devel… 30 2.6 4 3 0.4 3.21 0.375 0.068 0.14
3 HUMSS Cognitive Devel… 40 1.8 3.8 3.2 0.6 3.09 0.434 0.069 0.139
4 GAS Cognitive Devel… 20 2.4 3.8 3 0.65 3.1 0.438 0.098 0.205
The mean of STEM, ABM, HUMSS, and GAS is 3.230, 3.213, 3.090, and 3.100, respectively.
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Cognitive Development 110 1.92 3 0.59 Kruskal-Wallis
Based on the p-value, there is 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 Cognitive Develo… STEM ABM 20 30 -0.571 0.568 1 ns
2 Cognitive Develo… STEM HUMSS 20 40 -1.13 0.256 1 ns
3 Cognitive Develo… STEM GAS 20 20 -1.21 0.225 1 ns
4 Cognitive Develo… ABM HUMSS 30 40 -0.604 0.546 1 ns
5 Cognitive Develo… ABM GAS 30 20 -0.757 0.449 1 ns
6 Cognitive Develo… HUMSS GAS 40 20 -0.265 0.791 1 ns
Shapiro-Wilk normality test
data: Data1$Scores
W = 0.92926, p-value = 2.107e-11
Since p-value = 2.107e-11 < 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 0.0728 0.9298
327
The p-value is greater than the 0.05 level of significance. Thus, the homogeneity assumption of the variance is met.
`geom_line()`: Each group consists of only one observation.
ℹ Do you need to adjust the group aesthetic?
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 Social Interd… Scores 110 1.2 4 3.2 0.6 3.26 0.44 0.042 0.083
2 Students Beha… Scores 110 1.6 4 3.1 0.4 3.17 0.457 0.044 0.086
3 Cognitive Dev… Scores 110 1.8 4 3 0.4 3.15 0.415 0.04 0.079
The mean of social interdependence, students behavior, and cognitive development is 3.255, 3.167, and 3.151, respectively.
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Scores 330 3.96 2 0.138 Kruskal-Wallis
Based on the p-value, there is no 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 Social Interdep… Stude… 110 110 -1.66 0.0975 0.293 ns
2 Scores Social Interdep… Cogni… 110 110 -1.78 0.0745 0.224 ns
3 Scores Students Behavi… Cogni… 110 110 -0.126 0.899 1 ns
Based on the provided output above, we can say that it is the social interdependence.