In survey research, it makes a difference how the question is asked. "How would you rate the service you received at that restaurant?" is not the same as "Did you have to wait to be seated, to order your meal, to be served your food, or to pay yo...

R news and tutorials contributed by (552) R bloggers

Today, I take my first shots at ranking Major League Baseball (MLB) teams. I see my efforts at prediction and ranking an ongoing process so that my models improve, the data I incorporate are more meaningful, and ultimately my predictions are largely accurate. For the first attempt, let’s rank MLB teams using the Bradley-Terry (BT) model.Before we discuss the rankings, we need...

One day, while I was walking around Cambridge, I had a random thought — how do the characters on the Simpsons feel about each other? It doesn’t take long to figure out how Homer feels about Flanders (hint: he doesn’t always like him), or how Burns feels about everyone, but how does Marge feel about Bart? ...

One day, while I was walking around Cambridge, I had a random thought -- how do the characters on the Simpsons feel about each other? It doesn't take long to figure out how Homer feels about Flanders (hint: he doesn't always like him), or how Burns feels about everyone, but how does Marge feel about Bart? How does Flanders...

PCA is a very common method for exploration and reduction of high-dimensional data. It works by making linear combinations of the variables that are orthogonal, and is thus a way to change basis to better see patterns in data. You either do spectral decomposition of the correlation matrix or singular value decomposition of the data

We typically start with the data matrix, a rectangular array of rows and columns. If we type its name on the R command line, it will show itself. But the data matrix is hard to read, even when there are not many rows or columns. The heat map is a visual alternative. All you need is the R function...