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 and strand. It can be seen that there are 45 females and 55 males; 25 of which are from each strand.
Call:
lm(formula = `Financial Status` ~ `Job Opportunities` + `Personal Preference`,
data = Data)
Coefficients:
(Intercept) `Job Opportunities` `Personal Preference`
1.2518 0.4169 0.1868
From this, we may deduce that the data fail to satisfy two assumptions – Linearity and Homogeneity of Variance.
Loading required package: carData
Attaching package: 'car'
The following object is masked from 'package:dplyr':
recode
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ forcats 1.0.0 ✔ readr 2.1.5
✔ ggplot2 3.4.4 ✔ stringr 1.5.1
✔ lubridate 1.9.3 ✔ tibble 3.2.1
✔ purrr 1.0.2 ✔ tidyr 1.3.1
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
✖ car::recode() masks dplyr::recode()
✖ purrr::some() masks car::some()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Attaching package: 'rstatix'
The following object is masked from 'package:stats':
filter
Shapiro-Wilk normality test
data: Data$`Financial Status`
W = 0.96438, p-value = 0.008361
Since p-value = 0.008361 < 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 1 1.6529 0.2016
98
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: 2 × 11
Sex variable n min max median iqr mean sd se ci
<fct> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 Male Financial Status 55 2.2 4 3.2 0.6 3.09 0.42 0.057 0.113
2 Female Financial Status 45 1.8 3.8 3 0.4 3.04 0.357 0.053 0.107
The mean of male and female is 3.091 and 3.036, respectively.
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Financial Status 100 0.751 1 0.386 Kruskal-Wallis
Based on the p-value, there is no significant difference was observed between the group pairs.
Shapiro-Wilk normality test
data: Data$`Job Opportunities`
W = 0.97029, p-value = 0.02327
Since p-value = 0.002327 < 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 1 0.2825 0.5963
98
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: 2 × 11
Sex variable n min max median iqr mean sd se ci
<fct> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 Male Job Opportuniti… 55 1.8 3.8 3 0.4 2.98 0.459 0.062 0.124
2 Female Job Opportuniti… 45 1.8 3.8 3 0.4 2.95 0.405 0.06 0.122
The mean of male and female is 2.982 and 2.951, respectively.
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Job Opportunities 100 0.393 1 0.531 Kruskal-Wallis
Based on the p-value, there is no significant difference was observed between the group pairs.
Shapiro-Wilk normality test
data: Data$`Personal Preference`
W = 0.94866, p-value = 0.0006774
Since p-value = 0.0006774 < 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 1 0.9866 0.323
98
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: 2 × 11
Sex variable n min max median iqr mean sd se ci
<fct> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 Male Personal Prefer… 55 2.2 4 3 0.4 3.14 0.396 0.053 0.107
2 Female Personal Prefer… 45 1.8 4 3 0.6 3.03 0.478 0.071 0.144
The mean of female and male is 3.138 and 3.027, respectively.
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Personal Preference 100 1.05 1 0.307 Kruskal-Wallis
Based on the p-value, there is no significant difference was observed between the group pairs.
Shapiro-Wilk normality test
data: Data$`Financial Status`
W = 0.96438, p-value = 0.008361
Since p-value = 0.008361 < 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.3541 0.2615
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 STEM Financial Status 25 2.2 3.8 3 0.4 3.02 0.341 0.068 0.141
2 ABM Financial Status 25 2.4 4 3 0.4 3.05 0.425 0.085 0.176
3 HUMSS Financial Status 25 2.4 3.8 3.2 0.4 3.15 0.323 0.065 0.133
4 GAS Financial Status 25 1.8 3.8 3 0.6 3.05 0.47 0.094 0.194
The mean of STEM, ABM, HUMSS, and GAS is 3.016, 3.048, 3.152, and 3.048, respectively.
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Financial Status 100 2.91 3 0.405 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 Financial Status STEM ABM 25 25 0.270 0.787 1 ns
2 Financial Status STEM HUMSS 25 25 1.58 0.113 0.680 ns
3 Financial Status STEM GAS 25 25 0.446 0.656 1 ns
4 Financial Status ABM HUMSS 25 25 1.31 0.189 1 ns
5 Financial Status ABM GAS 25 25 0.176 0.860 1 ns
6 Financial Status HUMSS GAS 25 25 -1.14 0.255 1 ns
Shapiro-Wilk normality test
data: Data$`Job Opportunities`
W = 0.97029, p-value = 0.02327
Since p-value = 0.02327 < 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.7774 0.5094
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 STEM Job Opportuniti… 25 2.2 3.6 2.8 0.4 2.90 0.361 0.072 0.149
2 ABM Job Opportuniti… 25 2 3.6 3 0.6 2.90 0.405 0.081 0.167
3 HUMSS Job Opportuniti… 25 1.8 3.8 3.2 0.6 3.06 0.555 0.111 0.229
4 GAS Job Opportuniti… 25 2.2 3.8 3 0.6 3.02 0.391 0.078 0.161
The mean of STEM, ABM, HUMSS, and GAS is 2.904, 2.896, 3.056, and 3.016, respectively.
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Job Opportunities 100 4.00 3 0.261 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 Job Opportuniti… STEM ABM 25 25 0.288 0.773 1 ns
2 Job Opportuniti… STEM HUMSS 25 25 1.78 0.0744 0.446 ns
3 Job Opportuniti… STEM GAS 25 25 1.16 0.246 1 ns
4 Job Opportuniti… ABM HUMSS 25 25 1.50 0.135 0.808 ns
5 Job Opportuniti… ABM GAS 25 25 0.872 0.383 1 ns
6 Job Opportuniti… HUMSS GAS 25 25 -0.623 0.533 1 ns
Shapiro-Wilk normality test
data: Data$`Personal Preference`
W = 0.94866, p-value = 0.0006774
Since p-value = 0.0006774 < 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 3.0839 0.03096 *
96
---
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.
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 Personal Prefer… 25 2.2 4 3 0.2 3.07 0.369 0.074 0.152
2 ABM Personal Prefer… 25 2.6 4 3 0.4 3.14 0.394 0.079 0.163
3 HUMSS Personal Prefer… 25 2.6 4 3 0.2 3.16 0.342 0.068 0.141
4 GAS Personal Prefer… 25 1.8 4 3 0.8 2.98 0.595 0.119 0.246
The mean of STEM, ABM, HUMSS, and GAS is 3.072, 3.144, 3.160, and 2.976, respectively.
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Personal Preference 100 1.72 3 0.633 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 Personal Prefere… STEM ABM 25 25 0.152 0.879 1 ns
2 Personal Prefere… STEM HUMSS 25 25 0.582 0.560 1 ns
3 Personal Prefere… STEM GAS 25 25 -0.704 0.481 1 ns
4 Personal Prefere… ABM HUMSS 25 25 0.431 0.667 1 ns
5 Personal Prefere… ABM GAS 25 25 -0.856 0.392 1 ns
6 Personal Prefere… HUMSS GAS 25 25 -1.29 0.198 1 ns
Shapiro-Wilk normality test
data: Data1$Scores
W = 0.96953, p-value = 5.648e-06
Since p-value = 5.648e-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 2 0.3566 0.7004
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 Financial Sta… Scores 100 1.8 4 3 0.4 3.07 0.392 0.039 0.078
2 Job Opportuni… Scores 100 1.8 3.8 3 0.4 2.97 0.434 0.043 0.086
3 Personal Pref… Scores 100 1.8 4 3 0.45 3.09 0.436 0.044 0.087
The mean of Financial Status, Job Opportunities, and Personal Preference is 3.066, 2.968 and 3.088, respectively.
# A tibble: 1 × 6
.y. n statistic df p method
* <chr> <int> <dbl> <int> <dbl> <chr>
1 Scores 300 3.86 2 0.145 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 Financial Status Job O… 100 100 -1.68 0.0932 0.280 ns
2 Scores Financial Status Perso… 100 100 0.0467 0.963 1 ns
3 Scores Job Opportuniti… Perso… 100 100 1.73 0.0845 0.253 ns
Based on the provided output above, we can say that it is the personal preference.