#Data

library(readxl)
DataSittie <- read_excel("D:/stat 50/DataSittie.xlsx")
## New names:
## * `` -> ...63
## * `` -> ...64
View(DataSittie)
library(DescTools)
## Warning: package 'DescTools' was built under R version 4.1.3

Is there any significant relationship between the demographic and adherence towards their perceived effectiveness of health countermeasures?

library(dplyr)
## 
## 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
LC<- DataSittie %>%
      mutate(Agegroup = ifelse(Age <= 2,"at most 35 years old","More than 35 years old"))%>%
    mutate(EducationCode = ifelse(Education <= 3,"at most High School Level","at least High School Graduate"))%>%
    mutate(Incomecode =ifelse(Income<=2, "at most Php10,000", "More than Php10,000"))

##Over-all and Perceived Effectiveness

table(LC$OverallLevel)
## 
##      High       Low    Medium Very High 
##        59         6        19        12
prop.table(table(LC$OverallLevel))
## 
##      High       Low    Medium Very High 
## 0.6145833 0.0625000 0.1979167 0.1250000

Significant Relationship

##Overall and Effectiveness

library(gmodels)
## Warning: package 'gmodels' was built under R version 4.1.3
## Registered S3 method overwritten by 'gdata':
##   method         from     
##   reorder.factor DescTools
Crosstabdata<-CrossTable(LC$OverallLevel, LC$III)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  96 
## 
##  
##                 | LC$III 
## LC$OverallLevel |         1 |         2 | Row Total | 
## ----------------|-----------|-----------|-----------|
##            High |        46 |        13 |        59 | 
##                 |     0.729 |     1.604 |           | 
##                 |     0.780 |     0.220 |     0.615 | 
##                 |     0.697 |     0.433 |           | 
##                 |     0.479 |     0.135 |           | 
## ----------------|-----------|-----------|-----------|
##             Low |         2 |         4 |         6 | 
##                 |     1.095 |     2.408 |           | 
##                 |     0.333 |     0.667 |     0.062 | 
##                 |     0.030 |     0.133 |           | 
##                 |     0.021 |     0.042 |           | 
## ----------------|-----------|-----------|-----------|
##          Medium |         6 |        13 |        19 | 
##                 |     3.818 |     8.401 |           | 
##                 |     0.316 |     0.684 |     0.198 | 
##                 |     0.091 |     0.433 |           | 
##                 |     0.062 |     0.135 |           | 
## ----------------|-----------|-----------|-----------|
##       Very High |        12 |         0 |        12 | 
##                 |     1.705 |     3.750 |           | 
##                 |     1.000 |     0.000 |     0.125 | 
##                 |     0.182 |     0.000 |           | 
##                 |     0.125 |     0.000 |           | 
## ----------------|-----------|-----------|-----------|
##    Column Total |        66 |        30 |        96 | 
##                 |     0.688 |     0.312 |           | 
## ----------------|-----------|-----------|-----------|
## 
## 
Crosstabdata
## $t
##            y
## x            1  2
##   High      46 13
##   Low        2  4
##   Medium     6 13
##   Very High 12  0
## 
## $prop.row
##            y
## x                   1         2
##   High      0.7796610 0.2203390
##   Low       0.3333333 0.6666667
##   Medium    0.3157895 0.6842105
##   Very High 1.0000000 0.0000000
## 
## $prop.col
##            y
## x                    1          2
##   High      0.69696970 0.43333333
##   Low       0.03030303 0.13333333
##   Medium    0.09090909 0.43333333
##   Very High 0.18181818 0.00000000
## 
## $prop.tbl
##            y
## x                    1          2
##   High      0.47916667 0.13541667
##   Low       0.02083333 0.04166667
##   Medium    0.06250000 0.13541667
##   Very High 0.12500000 0.00000000
table2=matrix(c(8,17,58,15) ,ncol=2) 
colnames(table2)=c("Yes", "No") 
rownames(table2)=c("Low and Medium", "High and Very High")
table2
##                    Yes No
## Low and Medium       8 58
## High and Very High  17 15
chisq.test(table2)
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  table2
## X-squared = 16.971, df = 1, p-value = 3.795e-05
CramerV(table2)
## [1] 0.4411025

##Public Market

library(gmodels)
Crosstabdata<-CrossTable(LC$PubLevel, LC$III)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  96 
## 
##  
##              | LC$III 
##  LC$PubLevel |         1 |         2 | Row Total | 
## -------------|-----------|-----------|-----------|
##         High |        26 |         7 |        33 | 
##              |     0.484 |     1.064 |           | 
##              |     0.788 |     0.212 |     0.344 | 
##              |     0.394 |     0.233 |           | 
##              |     0.271 |     0.073 |           | 
## -------------|-----------|-----------|-----------|
##          Low |        14 |        11 |        25 | 
##              |     0.591 |     1.300 |           | 
##              |     0.560 |     0.440 |     0.260 | 
##              |     0.212 |     0.367 |           | 
##              |     0.146 |     0.115 |           | 
## -------------|-----------|-----------|-----------|
##       Medium |        19 |        12 |        31 | 
##              |     0.251 |     0.552 |           | 
##              |     0.613 |     0.387 |     0.323 | 
##              |     0.288 |     0.400 |           | 
##              |     0.198 |     0.125 |           | 
## -------------|-----------|-----------|-----------|
##    Very High |         7 |         0 |         7 | 
##              |     0.994 |     2.188 |           | 
##              |     1.000 |     0.000 |     0.073 | 
##              |     0.106 |     0.000 |           | 
##              |     0.073 |     0.000 |           | 
## -------------|-----------|-----------|-----------|
## Column Total |        66 |        30 |        96 | 
##              |     0.688 |     0.312 |           | 
## -------------|-----------|-----------|-----------|
## 
## 
Crosstabdata
## $t
##            y
## x            1  2
##   High      26  7
##   Low       14 11
##   Medium    19 12
##   Very High  7  0
## 
## $prop.row
##            y
## x                   1         2
##   High      0.7878788 0.2121212
##   Low       0.5600000 0.4400000
##   Medium    0.6129032 0.3870968
##   Very High 1.0000000 0.0000000
## 
## $prop.col
##            y
## x                   1         2
##   High      0.3939394 0.2333333
##   Low       0.2121212 0.3666667
##   Medium    0.2878788 0.4000000
##   Very High 0.1060606 0.0000000
## 
## $prop.tbl
##            y
## x                    1          2
##   High      0.27083333 0.07291667
##   Low       0.14583333 0.11458333
##   Medium    0.19791667 0.12500000
##   Very High 0.07291667 0.00000000
table2=matrix(c(33,23,33,7) ,ncol=2) 
colnames(table2)=c("Yes", "No") 
rownames(table2)=c("Low and Medium", "High and Very High")
table2
##                    Yes No
## Low and Medium      33 33
## High and Very High  23  7
chisq.test(table2)
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  table2
## X-squared = 4.987, df = 1, p-value = 0.02554
CramerV(table2)
## [1] 0.2507133

Bus Terminal

library(gmodels)
Crosstabdata<-CrossTable(LC$BusLevel, LC$III)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  96 
## 
##  
##              | LC$III 
##  LC$BusLevel |         1 |         2 | Row Total | 
## -------------|-----------|-----------|-----------|
##         High |        28 |        11 |        39 | 
##              |     0.053 |     0.116 |           | 
##              |     0.718 |     0.282 |     0.406 | 
##              |     0.424 |     0.367 |           | 
##              |     0.292 |     0.115 |           | 
## -------------|-----------|-----------|-----------|
##          Low |         7 |         6 |        13 | 
##              |     0.420 |     0.924 |           | 
##              |     0.538 |     0.462 |     0.135 | 
##              |     0.106 |     0.200 |           | 
##              |     0.073 |     0.062 |           | 
## -------------|-----------|-----------|-----------|
##       Medium |        16 |        12 |        28 | 
##              |     0.549 |     1.207 |           | 
##              |     0.571 |     0.429 |     0.292 | 
##              |     0.242 |     0.400 |           | 
##              |     0.167 |     0.125 |           | 
## -------------|-----------|-----------|-----------|
##    Very High |        15 |         1 |        16 | 
##              |     1.455 |     3.200 |           | 
##              |     0.938 |     0.062 |     0.167 | 
##              |     0.227 |     0.033 |           | 
##              |     0.156 |     0.010 |           | 
## -------------|-----------|-----------|-----------|
## Column Total |        66 |        30 |        96 | 
##              |     0.688 |     0.312 |           | 
## -------------|-----------|-----------|-----------|
## 
## 
Crosstabdata
## $t
##            y
## x            1  2
##   High      28 11
##   Low        7  6
##   Medium    16 12
##   Very High 15  1
## 
## $prop.row
##            y
## x                   1         2
##   High      0.7179487 0.2820513
##   Low       0.5384615 0.4615385
##   Medium    0.5714286 0.4285714
##   Very High 0.9375000 0.0625000
## 
## $prop.col
##            y
## x                    1          2
##   High      0.42424242 0.36666667
##   Low       0.10606061 0.20000000
##   Medium    0.24242424 0.40000000
##   Very High 0.22727273 0.03333333
## 
## $prop.tbl
##            y
## x                    1          2
##   High      0.29166667 0.11458333
##   Low       0.07291667 0.06250000
##   Medium    0.16666667 0.12500000
##   Very High 0.15625000 0.01041667
table2=matrix(c(23,18,58,13) ,ncol=2) 
colnames(table2)=c("Yes", "No") 
rownames(table2)=c("Low and Medium", "High and Very High")
table2
##                    Yes No
## Low and Medium      23 58
## High and Very High  18 13
chisq.test(table2)
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  table2
## X-squared = 7.2739, df = 1, p-value = 0.006996
CramerV(table2)
## [1] 0.2755572

Bus Terminal

library(gmodels)
Crosstabdata<-CrossTable(LC$BusLevel, LC$III)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  96 
## 
##  
##              | LC$III 
##  LC$BusLevel |         1 |         2 | Row Total | 
## -------------|-----------|-----------|-----------|
##         High |        28 |        11 |        39 | 
##              |     0.053 |     0.116 |           | 
##              |     0.718 |     0.282 |     0.406 | 
##              |     0.424 |     0.367 |           | 
##              |     0.292 |     0.115 |           | 
## -------------|-----------|-----------|-----------|
##          Low |         7 |         6 |        13 | 
##              |     0.420 |     0.924 |           | 
##              |     0.538 |     0.462 |     0.135 | 
##              |     0.106 |     0.200 |           | 
##              |     0.073 |     0.062 |           | 
## -------------|-----------|-----------|-----------|
##       Medium |        16 |        12 |        28 | 
##              |     0.549 |     1.207 |           | 
##              |     0.571 |     0.429 |     0.292 | 
##              |     0.242 |     0.400 |           | 
##              |     0.167 |     0.125 |           | 
## -------------|-----------|-----------|-----------|
##    Very High |        15 |         1 |        16 | 
##              |     1.455 |     3.200 |           | 
##              |     0.938 |     0.062 |     0.167 | 
##              |     0.227 |     0.033 |           | 
##              |     0.156 |     0.010 |           | 
## -------------|-----------|-----------|-----------|
## Column Total |        66 |        30 |        96 | 
##              |     0.688 |     0.312 |           | 
## -------------|-----------|-----------|-----------|
## 
## 
Crosstabdata
## $t
##            y
## x            1  2
##   High      28 11
##   Low        7  6
##   Medium    16 12
##   Very High 15  1
## 
## $prop.row
##            y
## x                   1         2
##   High      0.7179487 0.2820513
##   Low       0.5384615 0.4615385
##   Medium    0.5714286 0.4285714
##   Very High 0.9375000 0.0625000
## 
## $prop.col
##            y
## x                    1          2
##   High      0.42424242 0.36666667
##   Low       0.10606061 0.20000000
##   Medium    0.24242424 0.40000000
##   Very High 0.22727273 0.03333333
## 
## $prop.tbl
##            y
## x                    1          2
##   High      0.29166667 0.11458333
##   Low       0.07291667 0.06250000
##   Medium    0.16666667 0.12500000
##   Very High 0.15625000 0.01041667
table2=matrix(c(23,18,43,12) ,ncol=2) 
colnames(table2)=c("Yes", "No") 
rownames(table2)=c("Low and Medium", "High and Very High")
table2
##                    Yes No
## Low and Medium      23 43
## High and Very High  18 12
chisq.test(table2)
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  table2
## X-squared = 4.354, df = 1, p-value = 0.03692
CramerV(table2)
## [1] 0.2356804

Eatery

library(gmodels)
Crosstabdata<-CrossTable(LC$EatLevel, LC$III)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  96 
## 
##  
##              | LC$III 
##  LC$EatLevel |         1 |         2 | Row Total | 
## -------------|-----------|-----------|-----------|
##         High |        34 |        18 |        52 | 
##              |     0.086 |     0.188 |           | 
##              |     0.654 |     0.346 |     0.542 | 
##              |     0.515 |     0.600 |           | 
##              |     0.354 |     0.188 |           | 
## -------------|-----------|-----------|-----------|
##          Low |         3 |         3 |         6 | 
##              |     0.307 |     0.675 |           | 
##              |     0.500 |     0.500 |     0.062 | 
##              |     0.045 |     0.100 |           | 
##              |     0.031 |     0.031 |           | 
## -------------|-----------|-----------|-----------|
##       Medium |         8 |         8 |        16 | 
##              |     0.818 |     1.800 |           | 
##              |     0.500 |     0.500 |     0.167 | 
##              |     0.121 |     0.267 |           | 
##              |     0.083 |     0.083 |           | 
## -------------|-----------|-----------|-----------|
##    Very High |        21 |         1 |        22 | 
##              |     2.282 |     5.020 |           | 
##              |     0.955 |     0.045 |     0.229 | 
##              |     0.318 |     0.033 |           | 
##              |     0.219 |     0.010 |           | 
## -------------|-----------|-----------|-----------|
## Column Total |        66 |        30 |        96 | 
##              |     0.688 |     0.312 |           | 
## -------------|-----------|-----------|-----------|
## 
## 
Crosstabdata
## $t
##            y
## x            1  2
##   High      34 18
##   Low        3  3
##   Medium     8  8
##   Very High 21  1
## 
## $prop.row
##            y
## x                    1          2
##   High      0.65384615 0.34615385
##   Low       0.50000000 0.50000000
##   Medium    0.50000000 0.50000000
##   Very High 0.95454545 0.04545455
## 
## $prop.col
##            y
## x                    1          2
##   High      0.51515152 0.60000000
##   Low       0.04545455 0.10000000
##   Medium    0.12121212 0.26666667
##   Very High 0.31818182 0.03333333
## 
## $prop.tbl
##            y
## x                    1          2
##   High      0.35416667 0.18750000
##   Low       0.03125000 0.03125000
##   Medium    0.08333333 0.08333333
##   Very High 0.21875000 0.01041667
table2=matrix(c(11,11,55,19) ,ncol=2) 
colnames(table2)=c("Yes", "No") 
rownames(table2)=c("Low and Medium", "High and Very High")
table2
##                    Yes No
## Low and Medium      11 55
## High and Very High  11 19
chisq.test(table2)
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  table2
## X-squared = 3.6067, df = 1, p-value = 0.05755
CramerV(table2)
## [1] 0.2205644

Mall and Grocery Stores

library(gmodels)
Crosstabdata<-CrossTable(LC$MallLevel, LC$III)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  96 
## 
##  
##              | LC$III 
## LC$MallLevel |         1 |         2 | Row Total | 
## -------------|-----------|-----------|-----------|
##         High |        33 |        14 |        47 | 
##              |     0.015 |     0.032 |           | 
##              |     0.702 |     0.298 |     0.490 | 
##              |     0.500 |     0.467 |           | 
##              |     0.344 |     0.146 |           | 
## -------------|-----------|-----------|-----------|
##          Low |         4 |         4 |         8 | 
##              |     0.409 |     0.900 |           | 
##              |     0.500 |     0.500 |     0.083 | 
##              |     0.061 |     0.133 |           | 
##              |     0.042 |     0.042 |           | 
## -------------|-----------|-----------|-----------|
##       Medium |        13 |        10 |        23 | 
##              |     0.500 |     1.101 |           | 
##              |     0.565 |     0.435 |     0.240 | 
##              |     0.197 |     0.333 |           | 
##              |     0.135 |     0.104 |           | 
## -------------|-----------|-----------|-----------|
##    Very High |        16 |         2 |        18 | 
##              |     1.062 |     2.336 |           | 
##              |     0.889 |     0.111 |     0.188 | 
##              |     0.242 |     0.067 |           | 
##              |     0.167 |     0.021 |           | 
## -------------|-----------|-----------|-----------|
## Column Total |        66 |        30 |        96 | 
##              |     0.688 |     0.312 |           | 
## -------------|-----------|-----------|-----------|
## 
## 
Crosstabdata
## $t
##            y
## x            1  2
##   High      33 14
##   Low        4  4
##   Medium    13 10
##   Very High 16  2
## 
## $prop.row
##            y
## x                   1         2
##   High      0.7021277 0.2978723
##   Low       0.5000000 0.5000000
##   Medium    0.5652174 0.4347826
##   Very High 0.8888889 0.1111111
## 
## $prop.col
##            y
## x                    1          2
##   High      0.50000000 0.46666667
##   Low       0.06060606 0.13333333
##   Medium    0.19696970 0.33333333
##   Very High 0.24242424 0.06666667
## 
## $prop.tbl
##            y
## x                    1          2
##   High      0.34375000 0.14583333
##   Low       0.04166667 0.04166667
##   Medium    0.13541667 0.10416667
##   Very High 0.16666667 0.02083333
table2=matrix(c(17,14,49,16) ,ncol=2) 
colnames(table2)=c("Yes", "No") 
rownames(table2)=c("Low and Medium", "High and Very High")
table2
##                    Yes No
## Low and Medium      17 49
## High and Very High  14 16
chisq.test(table2)
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  table2
## X-squared = 3.2232, df = 1, p-value = 0.0726
CramerV(table2)
## [1] 0.207267

Church

library(gmodels)
Crosstabdata<-CrossTable(LC$ChurchLevel, LC$III)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  96 
## 
##  
##                | LC$III 
## LC$ChurchLevel |         1 |         2 | Row Total | 
## ---------------|-----------|-----------|-----------|
##           High |        20 |        12 |        32 | 
##                |     0.182 |     0.400 |           | 
##                |     0.625 |     0.375 |     0.333 | 
##                |     0.303 |     0.400 |           | 
##                |     0.208 |     0.125 |           | 
## ---------------|-----------|-----------|-----------|
##            Low |         1 |         2 |         3 | 
##                |     0.547 |     1.204 |           | 
##                |     0.333 |     0.667 |     0.031 | 
##                |     0.015 |     0.067 |           | 
##                |     0.010 |     0.021 |           | 
## ---------------|-----------|-----------|-----------|
##         Medium |         2 |         4 |         6 | 
##                |     1.095 |     2.408 |           | 
##                |     0.333 |     0.667 |     0.062 | 
##                |     0.030 |     0.133 |           | 
##                |     0.021 |     0.042 |           | 
## ---------------|-----------|-----------|-----------|
##      Very High |        43 |        12 |        55 | 
##                |     0.712 |     1.566 |           | 
##                |     0.782 |     0.218 |     0.573 | 
##                |     0.652 |     0.400 |           | 
##                |     0.448 |     0.125 |           | 
## ---------------|-----------|-----------|-----------|
##   Column Total |        66 |        30 |        96 | 
##                |     0.688 |     0.312 |           | 
## ---------------|-----------|-----------|-----------|
## 
## 
Crosstabdata
## $t
##            y
## x            1  2
##   High      20 12
##   Low        1  2
##   Medium     2  4
##   Very High 43 12
## 
## $prop.row
##            y
## x                   1         2
##   High      0.6250000 0.3750000
##   Low       0.3333333 0.6666667
##   Medium    0.3333333 0.6666667
##   Very High 0.7818182 0.2181818
## 
## $prop.col
##            y
## x                    1          2
##   High      0.30303030 0.40000000
##   Low       0.01515152 0.06666667
##   Medium    0.03030303 0.13333333
##   Very High 0.65151515 0.40000000
## 
## $prop.tbl
##            y
## x                    1          2
##   High      0.20833333 0.12500000
##   Low       0.01041667 0.02083333
##   Medium    0.02083333 0.04166667
##   Very High 0.44791667 0.12500000
table2=matrix(c(3,6,63,24) ,ncol=2) 
colnames(table2)=c("Yes", "No") 
rownames(table2)=c("Low and Medium", "High and Very High")
table2
##                    Yes No
## Low and Medium       3 63
## High and Very High   6 24
chisq.test(table2)
## Warning in chisq.test(table2): Chi-squared approximation may be incorrect
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  table2
## X-squared = 4.1218, df = 1, p-value = 0.04233
CramerV(table2)
## [1] 0.2457582

Plaza/Recreational ground

library(gmodels)
Crosstabdata<-CrossTable(LC$`PlazaLevel`, LC$III)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  96 
## 
##  
##               | LC$III 
## LC$PlazaLevel |         1 |         2 | Row Total | 
## --------------|-----------|-----------|-----------|
##          High |        14 |         3 |        17 | 
##               |     0.458 |     1.007 |           | 
##               |     0.824 |     0.176 |     0.177 | 
##               |     0.212 |     0.100 |           | 
##               |     0.146 |     0.031 |           | 
## --------------|-----------|-----------|-----------|
##           Low |        25 |        16 |        41 | 
##               |     0.360 |     0.793 |           | 
##               |     0.610 |     0.390 |     0.427 | 
##               |     0.379 |     0.533 |           | 
##               |     0.260 |     0.167 |           | 
## --------------|-----------|-----------|-----------|
##        Medium |        15 |        11 |        26 | 
##               |     0.462 |     1.017 |           | 
##               |     0.577 |     0.423 |     0.271 | 
##               |     0.227 |     0.367 |           | 
##               |     0.156 |     0.115 |           | 
## --------------|-----------|-----------|-----------|
##     Very High |        12 |         0 |        12 | 
##               |     1.705 |     3.750 |           | 
##               |     1.000 |     0.000 |     0.125 | 
##               |     0.182 |     0.000 |           | 
##               |     0.125 |     0.000 |           | 
## --------------|-----------|-----------|-----------|
##  Column Total |        66 |        30 |        96 | 
##               |     0.688 |     0.312 |           | 
## --------------|-----------|-----------|-----------|
## 
## 
Crosstabdata
## $t
##            y
## x            1  2
##   High      14  3
##   Low       25 16
##   Medium    15 11
##   Very High 12  0
## 
## $prop.row
##            y
## x                   1         2
##   High      0.8235294 0.1764706
##   Low       0.6097561 0.3902439
##   Medium    0.5769231 0.4230769
##   Very High 1.0000000 0.0000000
## 
## $prop.col
##            y
## x                   1         2
##   High      0.2121212 0.1000000
##   Low       0.3787879 0.5333333
##   Medium    0.2272727 0.3666667
##   Very High 0.1818182 0.0000000
## 
## $prop.tbl
##            y
## x                   1         2
##   High      0.1458333 0.0312500
##   Low       0.2604167 0.1666667
##   Medium    0.1562500 0.1145833
##   Very High 0.1250000 0.0000000
table2=matrix(c(40,27,26,3) ,ncol=2) 
colnames(table2)=c("Yes", "No") 
rownames(table2)=c("Low and Medium", "High and Very High")
table2
##                    Yes No
## Low and Medium      40 26
## High and Very High  27  3
chisq.test(table2)
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  table2
## X-squared = 7.1157, df = 1, p-value = 0.007641
CramerV(table2)
## [1] 0.2967249