File to calculate the Chi Square test, Fisher Test and Correspondence Analysis if feasible for different periods. The goal is to understand if there is a significative relation between ideology and the acceptance/rejection of concepts.
Loading required data - copy from previous file
## New names:
## • `note` -> `note...1`
## • `note` -> `note...2`
In this fragment of code we transform the matrices we had in contigency tables to make the calculations. We need to select the period (ph1,, ph2, ph3) and the concept, since a single table per concept is created.
## [1] "Carem progresses"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 3.19e-11
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.0007957
## alternative hypothesis: two.sided
## [1] "made in Argentina"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "technological leadership"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.05558
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "power reactor"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.1095
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "build the Carem"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.03959
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.02159
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.2758
## alternative hypothesis: two.sided
## [1] "military use"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "support for the nuclear plan"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.3083
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.07035
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "efficient electricity production"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.5
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.6694
## alternative hypothesis: two.sided
## [1] "safe for humans"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.4545
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "request more inclusion in decisions"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "concept no present for period 2"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "national pride"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.02597
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "develop renewables"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "organize protests"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "supported by the dictatorship"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "provide more information"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "solution to environmental issues"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "source of corruption"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.1818
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "boost to exports and economic growth"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.4167
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.3098
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.02374
## alternative hypothesis: two.sided
## [1] "supported by the Kirchners"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "generates employment"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.3631
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "maximum priority"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.5294
## alternative hypothesis: two.sided
## [1] "receives funding"
## [1] "concept no present for period 1"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.002716
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.1582
## alternative hypothesis: two.sided
## [1] "reasonable cost"
## [1] "concept no present for period 1"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.3333
## alternative hypothesis: two.sided
## [1] "is at risk"
## [1] "concept no present for period 1"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "SMR"
## [1] "concept no present for period 1"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "contributes to the country's development"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "seek private funding"
## [1] "concept no present for period 1"
## [1] "concept no present for period 2"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 0.4667
## alternative hypothesis: two.sided
## [1] "nationalize contractors"
## [1] "concept no present for period 1"
## [1] "concept no present for period 2"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "strategic project"
## [1] "concept no present for period 1"
## [1] "concept no present for period 2"
##
## Fisher's Exact Test for Count Data
##
## data: df
## p-value = 1
## alternative hypothesis: two.sided
## [1] "Carem progresses"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 0.66154, df = 2, p-value = 0.7184
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 46.225, df = 2, p-value = 9.168e-11
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 20.563, df = 2, p-value = 3.426e-05
## [1] "made in Argentina"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 1.0181, df = 2, p-value = 0.6011
## [1] "technological leadership"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 6.9802, df = 2, p-value = 0.0305
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 0.38941, df = 2, p-value = 0.8231
## [1] "power reactor"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 10.077, df = 2, p-value = 0.006482
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 0.76436, df = 2, p-value = 0.6824
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "build the Carem"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 6.9351, df = 2, p-value = 0.03119
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 7.5136, df = 2, p-value = 0.02336
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 2.6423, df = 2, p-value = 0.2668
## [1] "military use"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 0.75, df = 2, p-value = 0.6873
## [1] "support for the nuclear plan"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 1.8112, df = 2, p-value = 0.4043
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 6.5764, df = 2, p-value = 0.03732
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "efficient electricity production"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 1.5789, df = 2, p-value = 0.4541
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 0.72523, df = 2, p-value = 0.6959
## [1] "safe for humans"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "request more inclusion in decisions"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "concept no present for period 2"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "national pride"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 8.8, df = 2, p-value = 0.01228
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "develop renewables"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "organize protests"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "supported by the dictatorship"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "provide more information"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "solution to environmental issues"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 2, df = 2, p-value = 0.3679
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "source of corruption"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "boost to exports and economic growth"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 4.0408, df = 2, p-value = 0.1326
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 2.3087, df = 2, p-value = 0.3153
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 15.047, df = 2, p-value = 0.0005402
## [1] "supported by the Kirchners"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "generates employment"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 3.1112, df = 2, p-value = 0.2111
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "maximum priority"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 2.55, df = 2, p-value = 0.2794
## [1] "receives funding"
## [1] "concept no present for period 1"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 11.134, df = 2, p-value = 0.003823
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 4.2589, df = 2, p-value = 0.1189
## [1] "reasonable cost"
## [1] "concept no present for period 1"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "is at risk"
## [1] "concept no present for period 1"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 0.98684, df = 2, p-value = 0.6105
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "SMR"
## [1] "concept no present for period 1"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "contributes to the country's development"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "seek private funding"
## [1] "concept no present for period 1"
## [1] "concept no present for period 2"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = 1.6071, df = 2, p-value = 0.4477
## [1] "nationalize contractors"
## [1] "concept no present for period 1"
## [1] "concept no present for period 2"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## [1] "strategic project"
## [1] "concept no present for period 1"
## [1] "concept no present for period 2"
##
## Pearson's Chi-squared test
##
## data: df
## X-squared = NaN, df = 2, p-value = NA
## For item 1 : 86 observations
## For item 2 : 39 observations
## For item 3 : 16 observations
## For item 4 : 21 observations
## For item 5 : 33 observations
## For item 6 : 7 observations
## For item 7 : 26 observations
## For item 8 : 11 observations
## For item 9 : 12 observations
## For item 10 : 3 observations
## For item 11 : 12 observations
## For item 12 : 5 observations
## For item 13 : 7 observations
## For item 14 : 4 observations
## For item 15 : 7 observations
## For item 16 : 6 observations
## For item 17 : 2 observations
## For item 18 : 9 observations
## For item 19 : 7 observations
## For item 20 : 6 observations
## For item 21 : 1 observations
## For item 22 : 0 observations
## For item 23 : 0 observations
## For item 24 : 0 observations
## For item 25 : 0 observations
## For item 26 : 3 observations
## For item 27 : 0 observations
## For item 28 : 0 observations
## For item 29 : 0 observations
## For item 1 : 200 observations
## For item 2 : 69 observations
## For item 3 : 62 observations
## For item 4 : 64 observations
## For item 5 : 19 observations
## For item 6 : 1 observations
## For item 7 : 55 observations
## For item 8 : 20 observations
## For item 9 : 2 observations
## For item 10 : 0 observations
## For item 11 : 4 observations
## For item 12 : 2 observations
## For item 13 : 17 observations
## For item 14 : 3 observations
## For item 15 : 1 observations
## For item 16 : 1 observations
## For item 17 : 11 observations
## For item 18 : 25 observations
## For item 19 : 17 observations
## For item 20 : 143 observations
## For item 21 : 1 observations
## For item 22 : 41 observations
## For item 23 : 6 observations
## For item 24 : 75 observations
## For item 25 : 23 observations
## For item 26 : 5 observations
## For item 27 : 0 observations
## For item 28 : 0 observations
## For item 29 : 0 observations
## For item 1 : 234 observations
## For item 2 : 167 observations
## For item 3 : 178 observations
## For item 4 : 97 observations
## For item 5 : 38 observations
## For item 6 : 6 observations
## For item 7 : 39 observations
## For item 8 : 65 observations
## For item 9 : 9 observations
## For item 10 : 1 observations
## For item 11 : 10 observations
## For item 12 : 1 observations
## For item 13 : 1 observations
## For item 14 : 1 observations
## For item 15 : 5 observations
## For item 16 : 82 observations
## For item 17 : 2 observations
## For item 18 : 102 observations
## For item 19 : 14 observations
## For item 20 : 31 observations
## For item 21 : 17 observations
## For item 22 : 18 observations
## For item 23 : 3 observations
## For item 24 : 2 observations
## For item 25 : 162 observations
## For item 26 : 48 observations
## For item 27 : 15 observations
## For item 28 : 13 observations
## For item 29 : 26 observations
We won´t use this method since Event List perhaps are not updated with changes included in the last part of the analysis about ideology of certain institutions.