Preface

This interactive book is a companion book for Introduction to the New Statistics (abbreviated itns). The two types of additional material it offers are:

  • interactive exercises with solutions,
  • R tutorials for the end-of-chapter exercises.

Interactive Exercises

I have built the interactive exercises in this book with H5P.org. H5P stands for HTML5 Package, a free and open-source content collaboration framework based on JavaScript. With H5P, it is easy for everyone to display, create, share, and reuse interactive HTML5 content through a standard browser. At the moment (February 2020), there are 45 different kinds of exercises (“content types” in H5P parlance).

H5P content can be injected in any platform that supports embedded content (iframes). There exist already integrations for Learning Management Systems like Canvas, Brightspace, Blackboard, Moodle and other systems that support the standard for Learning Tools Interoperability (See also: How LTI works) In addition H5P has plugins developed for WordPress, Moodle, Drupal and several other publishing systems. If you don’t want to manage your own platform as a developer of interactive exercises you can also pay $57/month using H5P.com software as a paid service (SaaS).

I am using my German WordPress blog Gedankensplitter with the required free H5P-plugin to develop interactive content presented in this book. I have tested these exercises at the backend site of my WordPress installation and — if they work as intended — I have published them here into the R-publishing system bookdown via embedded code generated by the H5P WordPress plugin. As bookdown is built on top of R Markdown, it is very suitable also to include the R tutorial.

Even if the technical handling process of developing interactive content with H5P is documented excellently and therefore relatively quickly done, there is another — more educational — difficulty. What kind of exercises are valuable to learn the content presented in Introduction to The New Statistics (abbreviated: itns)?

Yes, there are some quizzes included in the book which one “only” has to transfer into H5P content. With the emphasis on “only,” I want to address some difficulty resulting from converting static textual exercises into dynamic computer evaluated interactions. So, for instance, it is laborious to design the right solution for open-ended answers. But besides this more technical problem, there is also the more pressing issue to create valuable educational interactions with the tools provided by H5P.

Instead of using just traditional educational interactions on the web (most notably multiple-choice and fill-the-gap), I have experimented with a wide variety of different types of exercises. Furthermore, I have applied the concept of multiple representations by developing various tasks for the same content.

R tutorial

The second component of this companion book to itns is a demonstration of how to carry out the statistical challenges presented in the end-of-chapter exercises using the programming language R, a free, open-source software environment for statistical computing and graphics. This part of the book is a tutorial. It applies R not only for the statistical analysis and visualization but also for other necessary practical tasks like data cleaning, data transformation, and data modeling.

I assume some basic knowledge with the R language as I will not explain installation procedures and basic R commands. I am using RStudio, the prevalent free integrated development environment (IDE), and occasionally I mention RStudio specifics. But these hints are rare and not essential to understand and to replicate my suggested R procedures.

I will conclude this section with a warning: I was intrigued by itns as a new generation of a statistical textbook. Criticizing the standard null hypothesis significance testing (NHST) by using the estimation approach based on confidence intervals (CIs), meta-analysis, and integrating Open Science met my thinking and preferences. But the truth is: I am neither a statistical expert nor an R wizard! My professional background is in instructional design and technology-enhanced learning (TEL). I am using the challenge to write this book as my particular vehicle to learn and practice statistical analysis and the R programming language. In this sense, I am just another learner applying the elaboration technique so splendid and convincing explained in “Make it stick: The science of successful learning(Brown, Roediger, and McDaniel 2014).

Educational considerations

In itns-solutions, I have structured the sequence of exercises following three pedagogical concepts (Baumgartner 2004):

  • Learning Mode: From more comfortable to more challenging learning modes. I distinguish grosso modo three different learning respectively teaching types. I cannot go into details here but (see for more information: ) summarized they are:

    • Learning I / Instruction: Students acquire static knowledge from the presented content via reading, listening, and watching. The main cognitive task in this mode is memorizing and retrieving knowledge.

    • Learning II / Interaction: Students acquire dynamic knowledge via exercises where they have to apply their static knowledge. To facilitate and stabilize their education, they get feedback on the results of their practice. The main cognitive task in Learning II is applying & analyzing specific situations.

    • Learning III / Construction: Students create their knowledge by adapting and modifying learned procedures for challenging situations. Here the main cognitive task is incorporating skills into their body (performance) and insights into their personal experiences and mastering life.

My three-part distinction of learning modes conforms to the more detailed six differences in the cognitive processes in the revised Bloom’sche taxonomy developed by Anderson, Krathwohl and colleagues (Anderson 2002; Krathwohl 2002; Anderson et al. 2000):

  • remember, understand (Learning I)

  • apply, analyze (Learning II)

  • evaluate, create (Learning III)

  • Multiple Representations: In itns-solutions, I am applying the old but time-proven concept of multiple representations (Ainsworth 1999; van Someren et al., n.d.): The same content is learned/experienced with several distinctive exercises. This approach is not entirely redundant as each activity addresses the brain capacity in different ways. Additionally, I sorted the same questions often differently. To give an example: I am using the same text to fill in the blanks from a prepared list of words, or via a dropdown menu (both are Learning II) and to write the correct concept without help (Learning III).

  • Self-Determined Learner: I developed all exercises with self-detemined respecticvely self-directed learners in mind (Ryan and Deci 2018; Deci and Ryan 2008; Knowles 1975; Mezirow 1985). Learners should solve the task to their likening. I chose the educational settings toward the highest possible freedom supported by the software (H5P content type). I will explain the details of my decisions in the [appendix](#H5P Content types. But to summarize here, learners can choose the order of the exercises, repeat them as often as they want, and even view the solution before they start with the activity. The idea behind this strategy of maximizing educational freedom is that adult self-learners don’t want to fool themselves and are to respect in their self-organizing learning endeavor. There is one exception to the general rule of educational liberty: All activities under the sections Assessment have somewhat limited freedom so that learners could get some overall feedback about their performance.

Types of Exercises

H5P is a potent tool with many different types of exercises (“content types” in H5P parlance). At the moment of this writing, I have uploaded 47 of these modules. But not every content type is appropriate for itns-solution.

The following table lists the 20 used content type, their functionality, and where they appear in the book (chapter sections and chapters).

Content Type Functionality Learning Video Glossary Bulk Recap Assessment R
Accordion Vertically stacked expandable items I X
Advanced Fill the Blanks Missing word (dropdown & blanks) II,III X X
Course Presentation Interactive slides II,III X
Dialog Cards Text-based turning cards I X
Documentation Tool Form wizard with text export III X
Drag & Drop Drag & Drop with images II X X
Drag the Words Drag & Drop with text II X X X X
Fill in the Blanks Missing word (blanks) III X X
Find Multiple Hotspots Many hotspots to find II X X
Flash Cards Text and/or image based flash cards with repetition II X
Iframe Embedder Embed URL II,III X
Image Hotspots Explore image hotspots I X X
Image Sequencing Sort images II X
Interactive Video Videos with educational interactions I,II X
Mark the Words Highlight words in a text II X X X
Memory Game Image pairing II X
Multiple Choice Single & multiple-choice questions II X X X
Question Set Sequence of various question types (Quiz) II,III X X
Summary Choose correct statements II X X
True/False Question True/false questions II X X X

Structure of chapter exercises

I have grouped all exercises into a recurring structure of sections:

  • Video: Each chapter starts with one or several interactive videos. I have taken the videos from the Routledge website. The video exercises support Learning I (watching the video explanations) but also Learning II (interactive activities).

  • Glossary: To learn the glossary entries, I have provided several exercises (“multiple representations”). Every glossary section follows the same pattern of exercise types:

    • Learning I: Accordion, Dialog Cards
    • Learning II: Drag Words, Flash Cards, Advanced Fill in the Blanks (dropdown menu)
    • Learning III: (Advanced) Fill in the Blanks (without help)

  • Bulk: Unter this heading, I summarize activities to the central part of the chapter covering the specific content parts students have to learn respectively to acquire. There is no fixed structure as the appropriate exercises depend on the subject presented. But generally, this part contains every conceivable suitable task. To better understand statistical concepts, this section also uses interactive visualizations developed with the shiny R packages. Instead of using the generic name “Bulk”, I generated different names for this section inspired by chapter subject and/or title.

  • Recap: Every chapter has a section on reporting and a list of take-home messages. Students may recapitulate the central concepts of each chapter with the Summary-task (Learning II). The exercises for the reporting sections vary between the content types of Accordion (Learning I), Summary (Learning II), and Advanced Fill in the Blanks or Documentation Tool (Learning III).

  • Assessment: Exercises under the Assessment heading are somewhat different. They consist (similar to Interactive Video) of a pool of varying content types organized either by the content type Question set (quizzes) or Course Presentation.

    • Question sets try to reconstruct the book quizzes, whereas Assessments are collections to simulate the in-chapter and end-of-chapter exercises. My cautionary usage of the qualifying words “try” and “simulation” signals that all interactive activities of itns-solutions are only my attempts to provide a similar experience as in the book. In many cases, I had to reformulate the puzzles or even to invent new statements to get a bunch of challenging distractors learners could choose.

    • In contrast to quizzes or Question Sets – where learners have similar freedoms as in other types of exercises – there are some restrictions in Assessments: If students want to inspect the solution of subsections they cannot retry only this part of the test, but have to repeat the whole quiz. At the end of an Assessment, learners will get overall feedback combined with a recommendation on how to proceed.

  • R Tutorial: This last part of each chapter contains exercises to learn R. I have separated this part from the other chapter content as not all people want to get into the details of the R programming language. It contains three types of material:

    • There is an explicatory part showing the usage of R and its effects (Learning I). Mostly this section includes applications of the LearnR and Shiny packages.

    • Another part uses the LearnR packages for stand-alone R exercises (Learning II).

    • Finally, there is a section where learners will find a complete R solution to the end-of-chapter exercises. Students who have already acquired some R programming knowledge should try to solve the book exercises by themself and compare their answers with my sample solution (Learning III).

Conventions used in this book

Most parts of this book consist only of headers and H5P exercises. Only in the R tutorial section, you will find textual explications. The following conventions give you a visual overview of particular paragraphs.

This green-colored block summarizes important steps and is structured often as an ordered checklist.
The light blue block explains a download and/or installations procedure. It always refers to a download link.
The dark blue block offers you some important information, tip, or hint.
The black-colored block recommends further material and explains how to get this additional content. In the case of online-material, it provides the link.
The yellow-colored block tells you how to avoid troubles before it starts.
The red-colored block explains error messages and how to recover from the problem.

General Setup

Global Options

### setting up working environment
### for details see: https://yihui.name/knitr/options/
knitr::opts_chunk$set(
        echo = T,
        message = T,
        error = T,
        warning = T,
        comment = '##',
        highlight = T,
        prompt = F,
        strip.white = T,
        tidy = T
        )

Installing and loading R packages

### accompanying R package: https://github.com/gitrman/itns
if (!require("itns")) {
    remotes::install_github("gitrman/itns", build = TRUE, build_opts = c("--no-resave-data", "--no-manual"))
    library("itns")
}
## Loading required package: itns
### https://www.tidyverse.org/
if (!require("tidyverse")) {
    install.packages("tidyverse", repos = "http://cran.wu.ac.at/")
    library(tidyverse)
}
## Loading required package: tidyverse
## ── Attaching packages ──────────────────────────────────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ ggplot2 3.3.0     ✓ purrr   0.3.3
## ✓ tibble  2.1.3     ✓ dplyr   0.8.5
## ✓ tidyr   1.0.2     ✓ stringr 1.4.0
## ✓ readr   1.3.1     ✓ forcats 0.5.0
## ── Conflicts ─────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
### above command installed and loaded the core tidyverse packages: ggplot2: data visualisation tibble: a modern
### take on data frames tidyr: data tidying readr: data import (csv, tsv, fwf) purrr: functional R programming
### dplyr: data (frame) manipulation stringr: string manipulation forcats: working with categorial varialbes


### to calculate mode:
if (!require("modeest")) {
    install.packages("modeest", repos = "http://cran.wu.ac.at/")
    library(modeest)
}
## Loading required package: modeest
## Registered S3 method overwritten by 'rmutil':
##   method         from
##   print.response httr
# I am going to use the `janitor` package for calculating table totals
if (!require("janitor")) {
    install.packages("janitor", repos = "http://cran.wu.ac.at/")
    library(janitor)
}
## Loading required package: janitor
## 
## Attaching package: 'janitor'
## The following objects are masked from 'package:stats':
## 
##     chisq.test, fisher.test
### install 'checkr' to test code submissions in learnr (and potentially other) tutorials there is also a
### problem in line 639 in 'vignettes/checkr.Rmd' I have changed version hoping that 0.6 is unsensible to the
### 'older' CRAN version (0.4) and does not update
if (!require("checkr")) {
    remotes::install_github("petzi53/checkr2", build = TRUE, build_opts = c("--no-resave-data", "--no-manual"))
    library(checkr)
}
## Loading required package: checkr
if (!require("itns")) {
    remotes::install_github("gitrman/itns", build = TRUE, build_opts = c("--no-resave-data", "--no-manual"))
    library("itns")
}

Theme adaption for the graphic display with ggplot2

my_theme <- theme_light() + theme(plot.title = element_text(size = 10, face = "bold", hjust = 0.5))
theme(plot.background = element_rect(color = NA, fill = NA)) + theme(plot.margin = margin(1, 0, 0, 0, unit = "cm"))
## List of 2
##  $ plot.background:List of 5
##   ..$ fill         : logi NA
##   ..$ colour       : logi NA
##   ..$ size         : NULL
##   ..$ linetype     : NULL
##   ..$ inherit.blank: logi FALSE
##   ..- attr(*, "class")= chr [1:2] "element_rect" "element"
##  $ plot.margin    : 'margin' num [1:4] 1cm 0cm 0cm 0cm
##   ..- attr(*, "valid.unit")= int 1
##   ..- attr(*, "unit")= chr "cm"
##  - attr(*, "class")= chr [1:2] "theme" "gg"
##  - attr(*, "complete")= logi FALSE
##  - attr(*, "validate")= logi TRUE