Skip to main content

Posts

Showing posts with the label code

(Bootstraping) Follow-Up Contrasts for Within-Subject ANOVAs

An updated version of this post  (with all the code the isn't rendered here)  can be found here>> So you've run an ANOVA and found that your residuals are neither normally distributed, nor homogeneous, or that you are in violation of any other assumptions . Naturally you want to run some a-parametric analysis... but how? In this post I will demonstrate how to run a permutation test ANOVA (easy!) and how to run bootstrap follow-up analysis (a bit more challenging) in a mixed design (both within- and between-subject factors) ANOVA. I've chosen to use a mixed design model in this demonstration for two reasons: I've never seen this done before. You can easily modify this code (change / skip some of these steps) to accommodate purely within- or purely between-subject designs. Permutation ANOVA Running a permutation test for your ANOVA in R is as easy as... running an ANOVA in R, but substituting aov with aovperm from the permuco package . library(pe...

Quidditch: is it all about the Snitch?

An updated version of this post can be found here>> Much has been said about how the game of Quidditch is ruined by the scoring system - specifically how it makes no sense that the snitch is worth 150 points  and  that catching it ends the game [ 1 , 2 , 3 ]. Most of these arguments seem to revolve around the claim that it is nearly impossible to win a match of Quidditch without catching the snitch. Is this true? Let's try and answer this question formally using statistics and R simulations: What is the probability of winning a Quidditch match without catching the snitch? Victor Krum caught the snitch for Bulgaria, but Ireland still won (1994 World cup)

Examining Inter-Rater Reliability in a Reality Baking Show

An updated version of this post  (with all the code the isn't rendered here)  can be found here>> Game of Chefs is an Israeli reality cooking competition show, where chefs compete for the title of "Israel's most talented chef". The show has four stages: blind auditions, training camp, kitchen battles, and finals. Here I will examine the 4th season's ( Game of Chefs: Confectioner ) inter-rater reliability in the blind auditions, using some simple R code. The Format In the blind auditions, candidates have 90 minutes to prepare a dessert, confection or other baked good, which is then sent to the show's four judges for a blind taste test. The judges don't see the candidate, and know nothing about him or her, until after they deliver their decision - A "pass" decision is signified by the judge granting the candidate a kitchen knife; a "fail" decision is signified by the judge not granting a knife. A candidate who receives a ...

cheatR: an R package for catching cheaters

An updated version of this post can be found here >> . cheatR is a mini package to help you find cheaters by comparing hand-ins. It was developed by Almog Simchon and me in response to students overheard bragging about how an assignment in an first-year undergrad course was "super easy" because "we all just copied from each other!" (though this would later turn out to be an exaggeration). Our idea was to compare each hand-in to all other hand-ins and see the degree of overlap between them. This was achieved using the  ngram  r-package to break each hand-in into a list of "phrases" and then to count how many times each phrase appeared across a pair of documents 1 . Finally, the percent of non-unique phrases was calculated.