You think a linear regression might be an appropriate statistical analysis for your data, but you’re not entirely sure. What should you check before running your model to find out?

by TAF Support

You think a linear regression might be an appropriate statistical analysis for your data, but you’re not entirely sure. What should you check before running your model to find out?

I received a question recently about R Commander, a free R package. R Commander is the powerhouse of our upcoming workshop R for SPSS Users.

R Commander overlays a menu-based interface to R, so just like SPSS or JMP, you can run analyses using menus. Nice, huh?

The question was whether R Commander does everything R does, or just a small subset.

Unfortunately, R Commander can’t do everything R does. Not even close.

But it does *a lot*. More than just the basics.

So I thought I would show you some of the things R Commander can do entirely through menus–no programming required, just so you can see just how unbelievably useful it is.

**Import data sets from other software:**

- SPSS
- Stata
- Excel
- Minitab
- Text
- SAS Xport

**Define Numerical Variables as categorical and label the values**

**Open the data sets that come with R packages**

**Merge Data Sets**

**Edit and show the data in a data spreadsheet**

Personally, I think that if this was all R Commander did, it would be incredibly useful. These are the types of things I just cannot remember all the commands for, since I just don’t use R often enough.

Yes, R Commander does many of the simple statistical tests you’d expect:

- Chi-square tests
- Paired and Independent Samples t-tests
- Tests of Proportions
- Common nonparametrics, like Friedman, Wilcoxon, and Kruskal-Wallis tests
- One-way ANOVA and simple linear regression

What is surprising though, is how many higher-level statistics and models it runs:

- Hierarchical and K-Means Cluster analysis (with 7 linkage methods and 4 options of distance measures)
- Principal Components and Factor Analysis
- Linear Regression (with model selection, influence statistics, and multicollinearity diagnostic options, among others)
- Logistic regression for binary, ordinal, and multinomial responses
- Generalized linear models, including Gamma and Poisson models

In other words–you can use R Commander to run in R most of the analyses that most researchers need.

A sample of the types of graphs R Commander creates in R without you having to write any code:

- QQ Plots
- Scatter plots
- Histograms
- Box Plots
- Bar Charts

The nice part is that it does not only do simple versions of these plots. You can, for example, add regression lines to a scatter plot or run histograms by a grouping factor.

by guest 2 Comments

*by David Lillis, Ph.D.*

*This is Part 12 in my R Tutorial Series: R is Not so Hard. Go back to Part 11 or start with Part 1.*

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)`

That was easy, but you need more from your histogram. [Read more…] about R is Not So Hard! A Tutorial, Part 12: Creating Histograms & Setting Bin Widths

The Analysis Factor uses cookies to ensure that we give you the best experience of our website. If you continue we assume that you consent to receive cookies on all websites from The Analysis Factor.

Continue Privacy PolicyPrivacy & Cookies Policy

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.