In our last post, we calculated Pearson and Spearman correlation coefficients in R and got a surprising result. So let’s investigate the data a ... Continue Reading
In our last post, we calculated Pearson and Spearman correlation coefficients in R and got a surprising result. So let’s investigate the data a ... Continue Reading
In my last blog post we fitted a generalized linear model to count data using a Poisson error structure. We found, however, that there was ... Continue Reading
In my last couple of articles (Part 4, Part 5), I demonstrated a logistic regression model with binomial errors on binary data in R’s glm() ... Continue Reading
In my last post I used the glm() command in R to fit a logistic model with binomial errors to investigate the relationships between the numeracy and ... Continue Reading
Today let’s re-create two variables and see how to plot them and include a regression line. We take height to be a variable that describes the heights ... Continue Reading
In the last lesson, we saw how to use qplot to map symbol colour to a categorical variable. Now we see how to control symbol colours and create legend ... Continue Reading
In this lesson, let’s see how to use qplot to map symbol colour to a categorical variable. Copy in the following data set (a medical data set ... Continue Reading
In this lesson, we see how to use qplot to create a simple scatterplot. The qplot (quick plot) system is a subset of the ggplot2 (grammar of ... Continue Reading
In this lesson, let’s see how to create mathematical expressions for your graph in R. We'll use an example of graphing a cosine curve, along with ... Continue Reading
In our last article, we learned about model fit in Generalized Linear Models on binary data using the glm() command. We continue with the same glm on ... Continue Reading
In Part 13, let’s see how to create box plots in R. Let’s create a simple box plot using the boxplot() command, which is easy to use. First, we set up ... Continue Reading
I'm sure you've heard that R creates beautiful graphics. It's true, and it doesn't have to be hard to do so. Let’s start with a simple histogram ... Continue Reading
Let’s create a simple bar chart in R using the barplot() command, which is easy to use. First, we set up a vector of numbers. Then we count them ... Continue Reading
In Part 7, let’s look at further plotting in R. Try entering the following three commands together (the semi-colon allows you to place several ... Continue Reading
In Part 6, let’s look at basic plotting in R. Try entering the following three commands together (the semi-colon allows you to place several commands ... Continue Reading
In Part 3 and Part 4 we used the lm() command to perform least squares regressions. We saw how to check for non-linearity in our data by fitting ... Continue Reading
In Part 3 we used the lm() command to perform least squares regressions. In Part 4 we will look at more advanced aspects of regression models and see ... Continue Reading
In Part 2 of this series, we created two variables and used the lm() command to perform a least squares regression on them, treating one of them as ... Continue Reading
In Part 1 we installed R and used it to create a variable and summarize it using a few simple commands. Today let’s re-create that variable and also ... Continue Reading