Welcome to Kristoffer Magnusson's blog about

R, STATISTICS, PSYCHOLOGY, OPEN SCIENCE, DATA VISUALIZATION

## Articles with the R tag

Visualizing a One-Way ANOVA using D3.js

A while ago I was playing around with the javascript package D3.js, and I began with this visualization—that I never really finished—of how a one-way ANOVA is calculated. I tried to make it look like a plot from ggplot2 except with interactive elements. Take a look at it after the jump

Creating a typical textbook illustration of statistical power using either ggplot or base graphics

A common way of illustrating the idea behind statistical power in null hypothesis significance testing, is by plotting the sampling distributions of the null hypothesis and the alternative hypothesis. Typically, these illustrations highlight the regions that correspond to making a type II error, type I error and correctly rejecting the null hypothesis (i.e. the test’s power). In this post I will show how to create such “power plots” using both ggplot and R’s base graphics.

Analytical and simulation-based power analyses for mixed-design ANOVAs

In this post I show some R-examples on how to perform power analyses for mixed-design ANOVAs. The first example is analytical—and adapted from formulas used in G*Power (Faul et al., 2007), and the second example is a Monte Carlo simulation.

How to tell when error bars correspond to a significant p-value

Can you tell when error bars based on 95 % CIs or standard errors correspond to a significant p-value? Don’t fret if you think it’s hard, a study from 2005 showed that researchers in psychogoly, behavior neuroscience and medicine had a hard time judging when error bars from two independent groups signified a significant difference

An R Script to Automatically download PubMed Citation Counts By Year of Publication

Background I believe there’s some information to be gained from looking at publication trends over time. But it’s really troublesome to do it by hand; fortunately it’s not so troublesome to do it in R statistical software. Though, data like these should be interpreted with extreme caution …

The (Un)disputed Champion of Psychotherapy – Clinical psychologists and their theoretical orientations

Cognitive Behavioral Therapy is the psychological treatment of choice for many, if not all, mental disorders. Nonetheless a majority of US clinical psychologist do not primarily identify themselves as either cognitive or behavioral therapists. Looking at data from PubMed publication counts a clear picture emerges -- psychodynamic researchers might be research loafers.