Blog Archives

At what sample size do correlations stabilize?

June 6, 2013
By
At what sample size do correlations stabilize?

Maybe you have encountered this situation: you run a large-scale study over the internet, and out of curiosity, you frequently check the correlation between two variables. My experience with this practice is usually frustrating, as in small sample sizes (and we will see what “small” means in this context) correlations go up and down, change sign,

Read more »

Installation of WRS package (Wilcox’ Robust Statistics)

April 22, 2013
By

Some users had trouble installing the WRS package from R-Forge. Here’s a method that should work automatically and fail-safe: ?View Code RSPLUS# first: install dependent packages install.packages(c("MASS", "akima", "robustbase"))   # second: install suggested packages install.packages(c("cobs", "robust", "mgcv", "scatterplot3d", "quantreg", "rrcov", "lars", "pwr", "trimcluster", "parallel", "mc2d", "psych", "Rfit"))   # third: install WRS install.packages("WRS", repos="http://R-Forge.R-project.org",

Read more »

Improved evolution of correlations

January 21, 2013
By

Update June 2013: A systematic analysis of the topic has been published:Schönbrodt, F. D., & Perugini, M. (2013). At what sample size do correlations stabilize? Journal of Research in Personality, 47, 609-612. doi:10.1016/j.jrp.2013.05.009 Check also the supplementary website, where you can find the PDF of the paper. As an update of this post: here’s an

Read more »

Optimizing parameters for an oscillator – Video

January 10, 2013
By

Here’s a video how the modFit function from the FME package optimizes parameters for an oscillation. A Nelder-Mead-optimizer (R function optim) finds the best fitting parameters for an undampened oscillator. Minimum was found after 72 iterations, true parameter eta was -.05: Evolution of parameters in optimization process from Felix Schönbrodt on Vimeo. More on estimating

Read more »

R-package: Wilcox’ Robust Statistics updated (WRS v0.20)

January 8, 2013
By

Rand Wilcox constantly updates the functions accompanying his books on robust statistics. Recently, they have been updated to version 20. The functions are available in the WRS package for R – for installation simply type install.packages("WRS", repos="http://R-Forge.R-project.org") In version 0.20, a number of functions dealing with ANCOVA have been added and some others improved. Unfortunately,

Read more »

Parse pdf files with R (on a Mac)

October 4, 2012
By

Inspired by this blog post from theBioBucket, I created a script to parse all pdf files in a directory. Due to its reliance on the Terminal, it’s Mac specific, but modifications for other systems shouldn’t be too hard (as a start for Windows, see BioBucket’s script). First, you have to install the command line tool

Read more »

How to check your package with R-devel

September 12, 2012
By

In response to an update to ggplot2 (now verson 0.9.2) I had to make some minor changes to our package TripleR. The CRAN maintainers also asked to … Please also fix other issues that may be apparent in checks with a current R-devel. Now, how can this be done? Here’s my workflow on Mac OS

Read more »

Visually weighted/ Watercolor Plots, new variants: Please vote!

September 6, 2012
By
Visually weighted/ Watercolor Plots, new variants: Please vote!

Update Oct-23: Added a new parameter add to the function. Now multiple groups can be plotted in a single plot (see example in my comment) As a follow-up on my R implementation of Solomon’s watercolor plots, I made some improvements to the function. I fine-tuned the graphical parameters (the median smoother line now diminishes faster

Read more »

Amazing fMRI plots for everybody!

September 5, 2012
By
Amazing fMRI plots for everybody!

Dear valued customer, it is a well-known scientific truth that research results which are accompanied by a fancy, colorful fMRI scan, are perceived as more believable and more persuasive than simple bar graphs or text results (McCabe & Castel, 2007; Weisberg, Keil, Goodstein, Rawson, & Gray, 2008). Readers even agree more with fictitious and unsubstantiated

Read more »

Visually weighted regression in R (à la Solomon Hsiang)

August 30, 2012
By
Visually weighted regression in R (à la Solomon Hsiang)

, and also the discussions on the Statistical Modeling, Causal

Read more »