Publications by Chuck Powell

Oneway ANOVA Explanation and Example in R; Part 1

27.09.2017

This tutorial was inspired by a this post published at DataScience+ by Bidyut Ghosh. Special thanks also to Dani Navarro, The University of New South Wales (Sydney) for the book Learning Statistics with R (hereafter simply LSR) and the lsr packages available through CRAN. I highly recommend it. Let’s load the required R packages library(ggplot2...

11538 sym R (7738 sym/11 pcs) 8 img 2 tbl

Oneway ANOVA Explanation and Example in R; Part 2

28.09.2017

Please read the first part published at DataScience+, if you haven’t. Effect sizes and the strength of our prediction One relatively common question in statistics or data science is, how “big” is the difference or the effect? At this point we can state with some statistical confidence that tire brand matters in predicting tire mileage life,...

11319 sym R (4943 sym/9 pcs) 10 img 1 tbl

Introducing the CGPfunctions package – March 22, 2018

21.03.2018

Overview This package includes functions that I find useful for teaching statistics as well as actually practicing the art. They typically are not “new” methods but rather wrappers around either base R or other packages and concepts I’m trying to master. Currently contains: Plot2WayANOVA which as the name implies conducts a 2 way ANOVA and...

2894 sym R (3047 sym/8 pcs) 10 img

Introducing the CGPfunctions package

21.03.2018

Overview This package includes functions that I find useful for teaching statistics as well as actually practicing the art. They typically are not “new” methods but rather wrappers around either base R or other packages and concepts I’m trying to master. Currently contains: Plot2WayANOVA which as the name implies conducts a 2 way ANOVA and...

2895 sym R (3047 sym/8 pcs) 12 img

Using functions to be more efficient – March 28, 2018

27.03.2018

In yesterday’s post I focused on the task of using R to “drive” MS Excel. I deliberately ended the post with a fully functioning (pun intended) but very ugly set of code. Why “ugly”? Well, because the last set of code wound up repeating 4 lines of code 12 times! ### Manual and painful way ## Create a new workbook wb <- createWorkbook() ...

8140 sym R (11192 sym/12 pcs) 2 img

Using R to ‘drive’ MS Excel – 3/27/2018

27.03.2018

I have until recently made it a habit to draw a clear distinction about using R for data analysis and Microsoft Excel for other office productivity tasks. I know there are people who use Excel to process data and even (gasp) to teach statistics with it. But I’m a bit snobbish that way and to date all my efforts have been in getting data out of ...

7540 sym R (12989 sym/8 pcs) 2 img

Writing functions for dplyr and ggplot2 – April 2, 2018

01.04.2018

In my last two posts I have been writing about the task of using R to “drive” MS Excel. The first post focused on just the basic mechanics of getting my colleague what she needed. The second post picked up with some ugly inefficient code and made it better using lapply and a for loop, just good old fashioned automation (the thing that compute...

13283 sym R (8760 sym/20 pcs) 44 img

Fun with M&M’s – April 3, 2018

02.04.2018

In this post we’re going to explore the Chi Squared Goodness of Fit test using M&M’s as our subject material. From there we’ll take a look at simultaneous confidence intervals a.k.a. multiple comparisons. On the R side of things we’ll make use of some old friends like ggplot2 and dplyr but we’ll also make use of two packages that were n...

10471 sym R (4705 sym/11 pcs) 8 img 6 tbl

Writing better R functions part one – April 6, 2018

05.04.2018

One of the nicest things about working with R is that with very little effort you can customize and automate activities to produce the output you want – just the way you want it. You can contrast that with more monolithic packages that may allow you to do a bit of scripting, but for the most part, the price of a GUI or packaging everything in o...

10566 sym R (6383 sym/11 pcs) 16 img

Writing better R functions part two – April 10, 2018

09.04.2018

In my last post I started to build two functions that took pairs of variables from a dataset and produced some nice useful ggplot plots from them. We started with the simplest case, plotting counts of how two variables cross-tabulate. Then we worked our way up to being able to automate the process of plotting lots of pairings of variables from th...

8075 sym R (6827 sym/19 pcs) 48 img