OptinMon

R Is Not So Hard! A Tutorial, Part 14: Pie Charts

March 27th, 2014 by

In Part 14, let’s see how to create pie charts in R. Let’s create a simple pie chart using the pie() command. As always, we set up a vector of numbers and then we plot them.

B <- c(2, 4, 5, 7, 12, 14, 16) (more…)


R Programming Video: 15 Tips for The Beginner

March 25th, 2014 by

One of our instructors–David Lillis–recently gave a talk in front of the Wellington R Users Group highlighting 15 Tips for using the R statistical programming language aimed at the beginner.

Below is a video recording of his presentation…

 


R Is Not So Hard! A Tutorial, Part 13: Box Plots

March 17th, 2014 by

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 a vector of numbers and then we plot them.

Box plots can be created for individual variables or for variables by group (more…)


R is Not So Hard! A Tutorial, Part 12: Creating Histograms & Setting Bin Widths

March 7th, 2014 by

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 using the hist() command, which is easy to use, but actually quite sophisticated.

First, we set up a vector of numbers and then we create a histogram.

B <- c(2, 4, 5, 7, 12, 14, 16)
hist(B)

image001

That was easy, but you need more from your histogram. (more…)


When Listwise Deletion works for Missing Data

February 25th, 2014 by

You may have never heard of listwise deletion for missing data, but you’ve probably used it without knowing it. Even when it doesn’t work well. listwise deletion for missing data

Listwise deletion means that any case in a data set is deleted from an analysis if they’re missing data on any variable in the analysis.

It’s the default in most statistical software packages.

Although its simplicity is a major advantage, it causes big problems in many missing data situations.

But…not always. If you happen to have one of the uncommon missing data situations in which (more…)


Five Common Relationships Among Three Variables in a Statistical Model

February 7th, 2014 by

In a statistical model–any statistical model–there is generally one way that a predictor X and a response Y can relate:Stage 2

This relationship can take on different forms, of course, like a line or a curve, but there’s really only one relationship here to measure.

Usually the point is to model the predictive or explanatory ability, the effect, of X on Y.

In other words, there is a clear response variable*, although not necessarily a causal relationship. We could have switched the direction of the arrow to indicate that Y predicts X. Or used a two-headed arrow to show a correlation, with no direction, but that’s a whole other story.

For our purposes, Y is the response variable and X the predictor.

But a third variable–another predictor–can relate to X and Y in a number of different ways. How this predictor relates to X and Y changes how we interpret the relationship between X and Y. (more…)