Statistical Software

R Is Not So Hard! A Tutorial, Part 9: Sub-setting

December 2nd, 2013 by

In Part 9, let’s look at sub-setting in R. I want to show you two approaches.

Let’s provide summary tables on the following data set of tourists from different nations, their gender and numbers of children. Copy and paste the following array into R. (more…)


R Is Not So Hard! A Tutorial, Part 8: Basic Commands

November 24th, 2013 by

Let’s look at some basic commands in R.

Set up the following vector by cutting and pasting from this document:

a <- c(3,-7,-3,-9,3,-1,2,-12, -14)
b <- c(3,7,-5, 1, 5,-6,-9,16, -8)
d <- c(1,2,3,4,5,6,7,8,9)

Now figure out what each of the following commands do. You should not need me to explain each command, but I will explain a few. (more…)


R Is Not So Hard! A Tutorial, Part 7: More Plotting in R

November 14th, 2013 by

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 commands on the same line).

Let’s take an example with two variables and enhance it.

X <- c(3, 4, 6, 6, 7, 8, 9, 12)
B1 <- c(4, 5, 6, 7, 17, 18, 19, 22)
B2 <- c(3, 5, 8, 10, 19, 21, 22, 26)

(more…)


Non-parametric ANOVA in SPSS

November 1st, 2013 by

I sometimes get asked questions that many people need the answer to.  Here’s one about non-parametric ANOVA in SPSS.

Question:

Is there a non-parametric 3 way ANOVA out there and does SPSS have a way of doing a non-parametric anova sort of thing with one main independent variable and 2 highly influential cofactors?

Quick Answer:

No.

Detailed Answer:

There is a non-parametric one-way ANOVA: Kruskal-Wallis, and it’s available in SPSS under non-parametric tests.  There is even a non-paramteric two-way ANOVA, but it doesn’t include interactions (and for the life of me, I can’t remember its name, but I remember learning it in grad school).

But there is no non-parametric factorial ANOVA, and it’s because of the nature of interactions and most non-parametrics.

What it basically comes down to is that most non-parametric tests are rank-based. In other words, (more…)


R Is Not So Hard! A Tutorial, Part 6: Basic Plotting in R

October 28th, 2013 by

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 on the same line).

x <- seq(-4, 4, 0.2) ;  y <- 2*x^2 + 4*x - 7
plot(x, y) (more…)


The Joy of Pasting SPSS Syntax

October 14th, 2013 by

Every so often I point out to a client who exclusively uses menus in SPSS that they can (and should) hit the Paste button instead of OK. Many times, the client never realized it was there.

I am here today to tell you that it is there, and it is wonderful.  For a few reasons.

When you use the menus in SPSS, you’re really taking a shortcut.  You’re telling SPSS which syntax commands, along with which options, you want to run.

Clicking OK at the end of a dialog box will run the  menu options you just picked. You may never see the underlying commands that SPSS just ran.

If instead you hit Paste, those command won’t automatically be run, but will instead the code to run those commands will be (more…)