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 7a0f60d35efcfaf4265ef25d5a6fb82fe0622a4d
parent 2f7d9e993c805f4b5568ac178091bbef867d8037
Author: eamoncaddigan <eamon.caddigan@gmail.com>
Date:   Fri,  4 Sep 2015 13:38:26 -0400

For John! :)

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()