## ecology movement
ecology <- GiugniYamasaki2009[grep("-E",GiugniYamasaki2009$Case),]
ecology$opinion <- as.numeric(ecology$Opinion>63)
ecology$alliances <- as.numeric(ecology$Alliances>127)
cs_truthTable(ecology,"PolicyChange",c('Protest','opinion','alliances'),case="Case")
reduce(PolicyChange~Protest+opinion+alliances,ecology,case="Case")
## anti-nuclear movement
nuclear <- GiugniYamasaki2009[grep("-N",GiugniYamasaki2009$Case),]
nuclear$opinion <- as.numeric(nuclear$Opinion>51)
nuclear$alliances <- as.numeric(nuclear$Alliances>127)
reduce(PolicyChange~Protest+opinion+alliances,nuclear,case="Case")
## Peace movement
peace <- GiugniYamasaki2009[grep("-P",GiugniYamasaki2009$Case),]
peace$opinion <- as.numeric(peace$Opinion>40)
peace$alliances <- as.numeric(peace$Alliances>127)
reduce(PolicyChange~Protest+opinion+alliances,peace,case="Case")
Run the code above in your browser using DataLab