One big advantage of R is its breadth. If anything has been done in statistics, there is an R package that will do it.
The problem is that sometimes there are four packages that will do it. This is big problem with R (and with Python for that matter). (more…)
In this nearly 6-hour tutorial you will learn menu-based R libraries so you can use R without having to fuss with R code. These libraries don’t cover everything R can do, but they do quite a bit and can set you up to make running R much easier.
(more…)
Choosing statistical software is part of The Fundamentals of Statistical Skill and is necessary to learning a second software (something we recommend to anyone progressing from Stage 2 to Stage 3 and beyond).
You have many choices for software to analyze your data: R, SAS, SPSS, and Stata, among others. They are all quite good, but each has its own unique strengths and weaknesses.
(more…)
There are multiple ways to interface with R. Some common interfaces are the basic R GUI, R Commander (the package “Rcmdr” that you use on top of the basic R GUI), and RStudio.
When I first started to learn to use R, I was bound and determined to use the basic R GUI.
As someone who was already used to programming in SAS, I wasn’t looking for a (more…)
If you are like I was for a long time, you have avoided learning R.
You’ve probably heard that there’s a steep learning curve. Or noticed that the available documentation is not necessarily user-friendly.
Frankly, both things are true, to some extent.
R is Open-Source
The best and worst thing about R is that it is open-source. So there is no single (more…)
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 little more with a scatter plot.
We use the same version of the data set of tourists. We have data on tourists from different nations, their gender, number of children, and how much they spent on their trip.
Again we copy and paste the following array into R.
M <- structure(list(COUNTRY = structure(c(3L, 3L, 3L, 3L, 1L, 3L, 2L, 3L, 1L, 3L, 3L, 1L, 2L, 2L, 3L, 3L, 3L, 2L, 3L, 1L, 1L, 3L,
1L, 2L), .Label = c("AUS", "JAPAN", "USA"), class = "factor"),GENDER = structure(c(2L, 1L, 2L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 2L), .Label = c("F", "M"), class = "factor"), CHILDREN = c(2L, 1L, 3L, 2L, 2L, 3L, 1L, 0L, 1L, 0L, 1L, 2L, 2L, 1L, 1L, 1L, 0L, 2L, 1L, 2L, 4L, 2L, 5L, 1L), SPEND = c(8500L, 23000L, 4000L, 9800L, 2200L, 4800L, 12300L, 8000L, 7100L, 10000L, 7800L, 7100L, 7900L, 7000L, 14200L, 11000L, 7900L, 2300L, 7000L, 8800L, 7500L, 15300L, 8000L, 7900L)), .Names = c("COUNTRY", "GENDER", "CHILDREN", "SPEND"), class = "data.frame", row.names = c(NA, -24L))
M
attach(M)
plot(CHILDREN, SPEND)
(more…)