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 73 females and 27 males; 20 of which are from ABM, 40 from GAS, 15 from HUMSS, and 25 from STEM.
Call:
lm(formula = `Sleep Patterns` ~ `Language Skills` + `Style and Behavior`,
data = Data)
Coefficients:
(Intercept) `Language Skills` `Style and Behavior`
1.0576 0.1215 0.4454
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.156 and 2.740, 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 a significant difference between the impact of watching Korean dramas in terms of sleep patterns 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 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.96178, p-value = 0.005394
The Shapiro-Wilk p-value = 0.005394 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.7814 0.3789
98
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 = 414.5, p-value = 7.925e-06
alternative hypothesis: true location shift is not equal to 0
Since the p-value is less than 0.05, we reject the null hypothesis, that is, there is significant difference on the impact of watching Korean dramas in terms of sleep patterns when grouped according to sex.
`summarise()` has grouped output by 'Sex'. You can override using the `.groups`
argument.
The mean for male and female is 2.356 and 2.795, 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 a significant difference between the impact of watching Korean dramas in terms of language skills when grouped according to their sex.
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.95309, p-value = 0.001333
The Shapiro-Wilk p-value = 0.001333 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 24.203 3.497e-06 ***
98
---
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: c and d
W = 708.5, p-value = 0.02923
alternative hypothesis: true location shift is not equal to 0
Since the p-value is less than 0.05, we reject the null hypothesis, that is, there is significant difference on the impact of watching Korean dramas in terms of language skills when grouped according to sex.
`summarise()` has grouped output by 'Sex'. You can override using the `.groups`
argument.
The mean for male and female is 2.407 and 2.797, 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 a significant difference between the impact of watching Korean dramas in terms of style and behavior when grouped according to their sex.
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.97385, p-value = 0.04386
The Shapiro-Wilk p-value = 0.04386 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.2625 0.0416 *
98
---
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 = 717.5, p-value = 0.03549
alternative hypothesis: true location shift is not equal to 0
Since the p-value is less than 0.05, we reject the null hypothesis, that is, there is significant difference on the impact of watching Korean dramas in terms of style and behavior when grouped according to sex.
Shapiro-Wilk normality test
data: Data$`Sleep Patterns`
W = 0.96487, p-value = 0.009087
Since p-value = 0.009087 < 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.9947 0.3988
96
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 GAS Sleep Patterns 40 1 3.8 2.8 0.6 2.70 0.631 0.1 0.202
2 ABM Sleep Patterns 20 1.4 3.4 2.8 0.3 2.62 0.494 0.11 0.231
3 HUMSS Sleep Patterns 15 2.2 3.4 2.8 0.7 2.77 0.413 0.107 0.229
4 STEM Sleep Patterns 25 1.2 3.4 2 0.8 2.26 0.576 0.115 0.238
The mean of GAS, ABM, HUMSS, and STEM is 2.695, 2.620, 2.773, and 2.256, respectively.
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Sleep Patterns 100 11.8 3 0.00809 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 Sleep Patterns GAS ABM 40 20 -0.441 0.659 1 ns
2 Sleep Patterns GAS HUMSS 40 15 0.505 0.614 1 ns
3 Sleep Patterns GAS STEM 40 25 -3.03 0.00242 0.0145 *
4 Sleep Patterns ABM HUMSS 20 15 0.801 0.423 1 ns
5 Sleep Patterns ABM STEM 20 25 -2.17 0.0296 0.178 ns
6 Sleep Patterns HUMSS STEM 15 25 -2.84 0.00458 0.0275 *
There is a significant difference between GAS and STEM, ABM and STEM, so with HUMSS and STEM.
Shapiro-Wilk normality test
data: Data$`Language Skills`
W = 0.88638, p-value = 3.414e-07
Since p-value = 3.414e-07 < 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.6545 0.182
96
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 GAS Language Skills 40 1 3.8 2.8 0.4 2.76 0.48 0.076 0.153
2 ABM Language Skills 20 1 3.6 3 0.3 2.8 0.632 0.141 0.296
3 HUMSS Language Skills 15 2 3.4 2.8 0.4 2.75 0.389 0.1 0.215
4 STEM Language Skills 25 1 3.4 2.4 0.8 2.4 0.683 0.137 0.282
The mean of GAS, ABM, HUMSS, and STEM is 2.760, 2.800, 2.747, and 2.400, respectively.
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Language Skills 100 7.75 3 0.0514 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 Language Skil… GAS ABM 40 20 0.992 0.321 1 ns
2 Language Skil… GAS HUMSS 40 15 -0.406 0.685 1 ns
3 Language Skil… GAS STEM 40 25 -2.07 0.0383 0.230 ns
4 Language Skil… ABM HUMSS 20 15 -1.16 0.248 1 ns
5 Language Skil… ABM STEM 20 25 -2.67 0.00766 0.0460 *
6 Language Skil… HUMSS STEM 15 25 -1.24 0.215 1 ns
There is a significant difference between GAS and STEM, ABM and STEM.
Shapiro-Wilk normality test
data: Data$`Style and Behavior`
W = 0.95697, p-value = 0.002461
Since p-value = 0.002461 < 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.985 0.4033
96
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 GAS Style and Behav… 40 1.4 4 3 0.4 2.84 0.509 0.081 0.163
2 ABM Style and Behav… 20 1.8 3.2 2.8 0.5 2.7 0.47 0.105 0.22
3 HUMSS Style and Behav… 15 2 3.8 3 0.6 2.89 0.501 0.129 0.277
4 STEM Style and Behav… 25 1 3.8 2.2 0.8 2.32 0.698 0.14 0.288
The mean of GAS, ABM, HUMSS, and STEM is 2.845, 2.700, 2.893, and 2.320, respectively.
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Style and Behavior 100 12.6 3 0.00561 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 Style and Be… GAS ABM 40 20 -0.817 4.14e-1 1 ns
2 Style and Be… GAS HUMSS 40 15 0.104 9.17e-1 1 ns
3 Style and Be… GAS STEM 40 25 -3.32 9.02e-4 0.00541 **
4 Style and Be… ABM HUMSS 20 15 0.748 4.55e-1 1 ns
5 Style and Be… ABM STEM 20 25 -2.08 3.80e-2 0.228 ns
6 Style and Be… HUMSS STEM 15 25 -2.69 7.19e-3 0.0431 *
There is a significant difference between GAS and STEM, ABM and STEM, so with HUMSS and STEM.
Shapiro-Wilk normality test
data: Data1$`Scores in terms of the impact of watching Korean dramas`
W = 0.94386, p-value = 2.852e-09
Since p-value = 2.852e-09 < 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.6816 0.5066
297
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: 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 Sleep Patterns Scores … 100 1 3.8 2.6 0.8 2.58 0.588 0.059 0.117
2 Language Skil… Scores … 100 1 3.8 2.8 0.6 2.68 0.573 0.057 0.114
3 Style and Beh… Scores … 100 1 4 2.8 0.6 2.69 0.59 0.059 0.117
The mean of sleep patterns, language skills, and style and behavior is 2.582, 2.676, and 2.692, respectively.
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Scores in terms of the impact of watching … 300 2.82 2 0.244 Krusk…
It is conclusive that there is no significant difference between 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 terms … Sleep… Langu… 100 100 1.50 0.132 0.397 ns
2 Scores in terms … Sleep… Style… 100 100 1.40 0.162 0.486 ns
3 Scores in terms … Langu… Style… 100 100 -0.107 0.915 1 ns
Pairwaise, there is no significant difference.
Based on the results, it is the style and behavior.