Blog Archives

Visualizing principal components with R and Sochi Olympic Athletes

March 27, 2014
By
Visualizing principal components with R and Sochi Olympic Athletes

Principal Components Analysis (PCA) is used as a dimensionality reduction method. Here we simply explain PCA step-by-step using data about Sochi Olympic Curlers. It is hard to visualize a high dimensional space. When I took linear algebra, the book and teachers spoke about it as if were easy to visualize a hyperspace, but...

Read more »

Type I error rates in test of normality by simulation

February 26, 2014
By
Type I error rates in test of normality by simulation

This simulation tests the type I error rates of the Shapiro-Wilk test of normality in R and SAS. First, we run a simulation in R. Notice the simulation is vectorized: there are no "for" loops that clutter the code and slow the simulation. # type I erroralpha <- 0.05# number of simulationsn.simulations <- 10000#...

Read more »