Week 13 - Exploring the data

CHC9012 | National Taiwan Normal University

Overview

This week, we will learn how to explore our results file.

Explore your results:

  • Preprocessing: How to identify outliers to have a clean dataset?
  • Analyses: How to look at the results based on the experimental design?
  • Explorations: How to check unexpected results?

A brief summary of this week’s new functions:

  • plot(): Generates scatter plots and boxplots.
  • length(): Returns the number of elements or items in a vector or factor level.
  • subset(): Filters a data frame to return only the rows or columns that meet specific conditions.
  • c(): Combine/Concatenate function; used here to group column names into a vector.
  • unique(): Removes duplicate rows or elements from an object.
  • table(): Creates contingency tables to show the counts/frequencies of factor levels.
  • aggregate(): Splits data into subsets and computes summary statistics (used to find the mean reaction time per participant).
  • droplevels(): Drops unused levels from a factor variable, usually after subsetting data.
  • ave(): Computes sub-group statistics (like group means or standard deviations) and returns a vector matching the original data length.
  • sd(): Calculates the standard deviation of a set of numbers.
  • nrow(): Counts the total number of rows in a data frame.
  • as.data.frame(): Converts an object (like a table) into a standard data frame format.
  • summarySE(): Gives a summary of the data (count, mean, SD, SE) based on several values.



Please complete the following tasks before our next meeting:


👀 Part 1: Have an overview of the results

🤔 Why it is a good idea to have an overall view of results

Even if we have an idea of what the results may look like based on our hypotheses, we should never forget that we are dealing with human behavior, and that something unexpected can happen. While our observations can (and should) be driven by our hypotheses, we need to keep an open mind!

First, we need to load the data that we have already prepared last week, in addition to the two necessary libraries:

load(file = "CHC9012_PCIbexDataPrepared.RData")

library(ez)
library(dplyr)
library(Rmisc)

We are digging into different ways to have a first idea of the results below:

  • Overall results based on the experimental design
  • Overall results by participant
  • Overall results by item
  • How to look at the background of the participants

🤯 Part 2: Identify and remove outliers

2.1. Identify and remove non-valid participants

Thanks to our first overview of the results, we know that the data from some participants are not valid. In this part, we will see how to identify and remove their data.

⚠️ Be careful

We need to be careful when removing data, especially not to remove too much! The challenge is that there is no absolute established rule. We will see in the following sections that we need to rely on converging evidence to be more confident and justify our choice.

We can use different types of evidence to identify non-valid participants:

  • Based on abnormal mean reaction time,
  • Based on shared IPs (shared device),
  • Based on the observation of specific participants.
Conclusion

We have converging evidence to say that one group’s behavior is very different. Therefore, the analyses will be conducted on the group of participants whose behavior indicates that they paid attention to the experiment itself.

2.2: Identify and remove non-valid trials

Once we identified and removed data from non-valid participants, we can remove outlier trials. Here is an overview of the process:


📊 Part 3: Analyses and explorations of the clean results

Now that we have a very clean dataset, we are ready to look at the results of our experiment.


📝 Assignment for next week

Please complete the following tasks before our next meeting: