Data

1. What is the demographic profile of the respondents in terms of:


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

Sex

Strand

The tables above provides the distributions of respondents in terms of sex, year level, and strand. It can be seen that there are 57 females and 43 males; 20 of which are from ABM, 20 from GAS, 40 from HUMSS, and 20 from STEM.

2. Is there a significant difference on the perceptions of the students towards mandatory ROTC in terms of physical capabilities, psychological capabilities, and attitude when grouped according to:

2.1 Sex


Call:
lm(formula = Attitude ~ `Physical Capabilities` + `Psychological Capabilities`, 
    data = Data)

Coefficients:
                 (Intercept)       `Physical Capabilities`  
                     1.73497                       0.05187  
`Psychological Capabilities`  
                     0.27566  

From this, we may deduce that the data fail to satisfy the two assumptions – Linearity and Homogeneity of Variance.

2.1.1 Sex and Physical Capabilities

`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 3.121 and 2.989, 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 between the perception of students towards mandatory ROTC in terms of physical capabilities 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.

Normality Test


    Shapiro-Wilk normality test

data:  res_aov$residuals
W = 0.96825, p-value = 0.01626

The Shapiro-Wilk p-value = 0.01626 on the residuals is less than the usual significance level of 0.05. Thus, we reject the hypothesis that residuals have a normal distribution.

Equality of Variance

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.1493    0.7
      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


    Wilcoxon rank sum test

data:  a and b
W = 1469, p-value = 0.08476
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 perception of the students in terms of physical capabilities when grouped according to sex.

2.1.2 Sex and Psychological Capabilities

`summarise()` has grouped output by 'Sex'. You can override using the `.groups`
argument.
# A tibble: 20 × 3
# Groups:   Sex [2]
   Sex    `Psychological Capabilities` count
   <fct>                         <dbl> <int>
 1 Female                          2.2     1
 2 Female                          2.4     4
 3 Female                          2.6     5
 4 Female                          2.8     3
 5 Female                          3      16
 6 Female                          3.2     9
 7 Female                          3.4     8
 8 Female                          3.6     6
 9 Female                          3.8     2
10 Female                          4       3
11 Male                            2.2     2
12 Male                            2.4     2
13 Male                            2.6     1
14 Male                            2.8     9
15 Male                            3       6
16 Male                            3.2     7
17 Male                            3.4     5
18 Male                            3.6     6
19 Male                            3.8     3
20 Male                            4       2

The mean for male and female is 3.149 and 3.130, 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.

Normality Test


    Shapiro-Wilk normality test

data:  res_aov$residuals
W = 0.97513, p-value = 0.05525

The Shapiro-Wilk p-value = 0.05525 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.

Equality of Variance

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.3591 0.5504
      98               

The p-value is greater than the 0.05 level of significance. Thus, the homogeneity assumption of the variance is met.

Two Sample T-test


    Welch Two Sample t-test

data:  c and d
t = 0.21253, df = 87.075, p-value = 0.8322
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -0.1587920  0.1968173
sample estimates:
mean of x mean of y 
 3.148837  3.129825 

Since the p-value= 0.8322 is greater than 0.05, we fail to reject the null hypothesis. Hence, there is no significant difference on the perception of the students towards mandatory ROTC in terms of psychological capabilities when grouped according to their sex.

2.1.3 Sex and Attitude

`summarise()` has grouped output by 'Sex'. You can override using the `.groups`
argument.
# A tibble: 21 × 3
# Groups:   Sex [2]
   Sex    Attitude count
   <fct>     <dbl> <int>
 1 Female      1.6     1
 2 Female      1.8     2
 3 Female      2.2     6
 4 Female      2.4     3
 5 Female      2.6    14
 6 Female      2.8     7
 7 Female      3      12
 8 Female      3.2     3
 9 Female      3.4     5
10 Female      3.6     3
# ℹ 11 more rows

The mean for male and female is 2.716 and 2.789, 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. 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.

Normality Test


    Shapiro-Wilk normality test

data:  res_aov$residuals
W = 0.98744, p-value = 0.4682

The Shapiro-Wilk p-value = 0.4682 on the residuals is less than the usual significance level of 0.05. Thus, we reject the hypothesis that residuals have a normal distribution.

Equality of Variance

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.1559 0.6938
      98               

The p-value is greater than the 0.05 level of significance. Thus, the homogeneity assumption of the variance is met.

Two Sample T-test


    Welch Two Sample t-test

data:  e and f
t = -0.7768, df = 92.437, p-value = 0.4393
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -0.2603230  0.1139338
sample estimates:
mean of x mean of y 
 2.716279  2.789474 

Since the p-value= 0.4393 is greater than 0.05, we fail to reject the null hypothesis. Hence, there is no significant difference on the perception of the students towards mandatory ROTC in terms of attitude when grouped according to their sex.

2.2 Strand

2.2.1 Strand and “Physical Capabilities”

Normality Test


    Shapiro-Wilk normality test

data:  Data$`Physical Capabilities`
W = 0.95467, p-value = 0.001708

Since p-value = 0.001708 < 0.05, it is conclusive that we reject the null hypothesis. That is, we cannot assume normality.

Equality of Variance

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.6565 0.5808
      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    Physical Capabi…    20   2.6   3.8    3    0.45  3.15 0.343 0.077 0.16 
2 HUMSS  Physical Capabi…    40   1.8   4      3    0.45  3.02 0.435 0.069 0.139
3 ABM    Physical Capabi…    20   2     3.8    2.9  0.45  2.87 0.491 0.11  0.23 
4 STEM   Physical Capabi…    20   2.6   3.8    3.1  0.45  3.18 0.394 0.088 0.184

The mean of GAS, HUMSS, ABM, and STEm is 3.150, 3.015, 2.870, and 3.180, respectively.

Kruskal-wallis Test

# A tibble: 1 × 6
  .y.                       n statistic    df      p method        
* <chr>                 <int>     <dbl> <int>  <dbl> <chr>         
1 Physical Capabilities   100      6.48     3 0.0905 Kruskal-Wallis

Based on the p-value, there is no significant difference was observed between the group pairs.

Pairwise Comparisons

# 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 Physical Capabi… GAS    HUMSS     20    40    -1.19  0.232  1     ns          
2 Physical Capabi… GAS    ABM       20    20    -2.03  0.0426 0.255 ns          
3 Physical Capabi… GAS    STEM      20    20     0.191 0.848  1     ns          
4 Physical Capabi… HUMSS  ABM       40    20    -1.15  0.251  1     ns          
5 Physical Capabi… HUMSS  STEM      40    20     1.42  0.157  0.941 ns          
6 Physical Capabi… ABM    STEM      20    20     2.22  0.0265 0.159 ns          

There is a significant difference between GAS and ABM, ABM and STEM.

2.2.2 Strand and Psychological Capabilities

Normality Test


    Shapiro-Wilk normality test

data:  Data$`Psychological Capabilities`
W = 0.97033, p-value = 0.02343

Since p-value = 0.02343 < 0.05, it is conclusive that we reject the null hypothesis. That is, we cannot assume normality.

Equality of Variance

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.1167 0.9501
      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    Psychological C…    20   2.6   4      3.1  0.8   3.21 0.408 0.091 0.191
2 HUMSS  Psychological C…    40   2.2   4      3.2  0.6   3.06 0.458 0.072 0.147
3 ABM    Psychological C…    20   2.2   4      3.1  0.45  3.19 0.47  0.105 0.22 
4 STEM   Psychological C…    20   2.4   3.8    3.1  0.4   3.16 0.393 0.088 0.184

The mean of GAS, HUMSS, ABM, and STEM is 3.210, 3.065, 3.190, and 3.160, respectively.

Kruskal-wallis Test

# A tibble: 1 × 6
  .y.                            n statistic    df     p method        
* <chr>                      <int>     <dbl> <int> <dbl> <chr>         
1 Psychological Capabilities   100      1.25     3 0.741 Kruskal-Wallis

Based on the p-value, there is no significant difference was observed between the group pairs.

Pairwise Comparisons

# 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 Psychological Ca… GAS    HUMSS     20    40   -0.903  0.366     1 ns          
2 Psychological Ca… GAS    ABM       20    20   -0.0330 0.974     1 ns          
3 Psychological Ca… GAS    STEM      20    20   -0.179  0.858     1 ns          
4 Psychological Ca… HUMSS  ABM       40    20    0.865  0.387     1 ns          
5 Psychological Ca… HUMSS  STEM      40    20    0.696  0.486     1 ns          
6 Psychological Ca… ABM    STEM      20    20   -0.146  0.884     1 ns          

2.2.3 Strand and Attitude

Normality Test


    Shapiro-Wilk normality test

data:  Data$Attitude
W = 0.97951, p-value = 0.1217

Since p-value = 0.1217 < 0.05, it is conclusive that we fail to reject the null hypothesis. That is, we can assume normality.

Equality of Variance

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.879 0.4549
      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    Attitude    20   2.2   3.6    2.8  0.6   2.84 0.382 0.085 0.179
2 HUMSS  Attitude    40   1.4   4      2.8  0.4   2.75 0.485 0.077 0.155
3 ABM    Attitude    20   1.6   3.4    2.5  0.8   2.53 0.512 0.115 0.24 
4 STEM   Attitude    20   2.2   3.8    2.8  0.45  2.92 0.402 0.09  0.188

The mean of GAS, HUMSS, ABM, and STEM is 2.84, 2.75, 2.53, and 2.93, respectively.

One WAY ANOVA

            Df Sum Sq Mean Sq F value Pr(>F)  
Strand       3  1.702  0.5672   2.722 0.0486 *
Residuals   96 20.002  0.2084                 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

It is conclusive that there is a significant difference on the perception of the students towards mandatory ROTC in terms of attitude when grouped according to strand.

3. Is there a significant relationship between physical capabilities, psychological capabilities, and attitude in terms of the perception of the students towards mandatory ROTC?

Normality Test


    Shapiro-Wilk normality test

data:  Data1$`Scores in terms of the perception of the students towards mandatory ROTC`
W = 0.97705, p-value = 9.754e-05

Since p-value = 9.754e-05 < 0.05, it is conclusive that we reject the null hypothesis. That is, we cannot assume normality.

Equality of Variance

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.437 0.6464
      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 Physical Capa… Scores …   100   1.8     4    3     0.6  3.05 0.431 0.043 0.086
2 Psychological… Scores …   100   2.2     4    3.2   0.6  3.14 0.436 0.044 0.087
3 Attitude       Scores …   100   1.4     4    2.8   0.4  2.76 0.468 0.047 0.093

The mean of physical capabilities, psychological capabilities, and attitude is 3.046, 3.138, and 2.758, respectively.

Kruskal-wallis Test

# A tibble: 1 × 6
  .y.                                           n statistic    df       p method
* <chr>                                     <int>     <dbl> <int>   <dbl> <chr> 
1 Scores in terms of the perception of the…   300      34.0     2 4.07e-8 Krusk…

Based on the p-value, there is a significant difference was observed between the group pairs.

Pairwise Comparisons

# 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… Physi… Psych…   100   100      1.45 1.47e-1 4.40e-1 ns          
2 Scores in te… Physi… Attit…   100   100     -4.17 3.08e-5 9.25e-5 ****        
3 Scores in te… Psych… Attit…   100   100     -5.62 1.92e-8 5.75e-8 ****        

Pairwise, there is significant difference.

4. Which have the most significant impact?

Based on the provided output above, it can be seen that the main factor of the perception of the students is psychological capabilities.