antivax-attitudes

Reanalyses of data from Horne, Powell, Hummel & Holyoak (2015)
git clone https://git.eamoncaddigan.net/antivax-attitudes.git
Log | Files | Refs | README | LICENSE

commit d0604a7cf12af077f8cd27553c5fac5807b13668
parent 75e3b83a8622d39be5ea0090b7251598a58a1792
Author: eamoncaddigan <eamon.caddigan@gmail.com>
Date:   Wed, 16 Sep 2015 19:43:44 -0400

Merge branch 'master' of github.com:eamoncaddigan/antivax-attitudes

Diffstat:
AEndingScoreDifferences.R | 24++++++++++++++++++++++++
1 file changed, 24 insertions(+), 0 deletions(-)

diff --git a/EndingScoreDifferences.R b/EndingScoreDifferences.R @@ -0,0 +1,24 @@ +# Worried about failures of random assignment. Let's check differences in FINAL +# scores, instead of differences in CHANGES. + +png(file="ending_scores.png", width=800, height=600) +par(mfrow = c(1, 3), mar=c(2, 1, 1, 1), oma=c(0, 0, 4, 0)) + +# We'll look at all the pairs of levels for x2. Easy for three levels, but this +# code is a bit more generic. +x2Combn <- combn(length(levels(questionnaireData$intervention)), 2) + +for (combnIdx in seq_len(dim(x2Combn)[2])) { + x2Level1 <- x2Combn[2, combnIdx] + x2Level2 <- x2Combn[1, combnIdx] + plotPost((mcmcMat[, paste0("b2[", x2Level1, "]")] + mcmcMat[, paste0("b2b3[", x2Level1, ",2]")]) - + (mcmcMat[, paste0("b2[", x2Level2, "]")] + mcmcMat[, paste0("b2b3[", x2Level2, ",2]")]), + main = "", + compVal = 0.0, ROPE = c(-0.05, 0.05), + xlab = "") + mtext(paste0(levels(questionnaireData$intervention)[x2Level1], " vs.\n", + levels(questionnaireData$intervention)[x2Level2]), + side = 3, line = -2) +} +title("Ending score differences", outer=TRUE) +dev.off()