Quick start with R: Improving our regression model (Part 29)

Last time we created two variables and used the lm() command to perform a least squares regression on them, and diagnosing our regression using the plot() command. Here are the data again. height = c(176, 154, 138, 196, 132, 176, 181, 169, 150, 175)<br /> bodymass = c(82, 49, 53,…

Quick start with R: Diagnosing our regression model (Part 28)

Last time we created two variables and used the lm() command to perform a least squares regression on them, treating one of them as the dependent variable and the other as the independent variable. Here they are again. height = c(176, 154, 138, 196, 132, 176, 181, 169, 150, 175)…

Quick start with R: More on regression (Part 27)

In my last blog we created two variables and used the lm() command to perform a least squares regression on them, treating one of them as the dependent variable and the other as the independent variable. Here they are again. height = c(176, 154, 138, 196, 132, 176, 181, 169,…

Quick start with R: Symbol sizes in qplot (Part 24)

In Blog 24, let’s see how to use qplot to map symbol colour to a categorical variable. Copy in the following dataset (a medical dataset relating to patients in a randomised controlled trial): M <- structure(list(PATIENT = structure(c(32L, 15L, 41L, 42L, 44L, 17L, 31L, 10L, 38L, 18L, 22L, 30L), .Label…

Quick start with R: Using qplot() function (Part 23)

In Part 23, let’s see how to use qplot to create a simple scatterplot. The qplot (quick plot) system is a subset of the ggplot2 (grammar of graphics) package which you can use to create nice graphs. It is great for creating graphs of categorical data, because you can map…

1 2 3 4