Repo

https://github.com/joeaoregan/2022_DAIE_GCA_JOR_MG


Abstract

Aim and Rationale

The purpose of this assignment was to form a hypothesis based on data collected at the beginning and end of a 12 week period of Cognitive Behavioural Therapy (CBT). The data was collected to investigate the effect of Jungian Sandplay therapy in a Virtual Reality environment. Patients were being treated for PTSD. Psychological interventions like this have been shown to have a positive impact.

Participants and Setting

The study consisted of 150 patients divided equally into 3 groups. An equal representation of male and female patients is present in each group. All patients were young adults aged 18 to 25 with no age information recorded.

  • Control (Cognitive Behavioural Therapy patients who did not use the VR app)
  • Static (Patients who used a non-animated version of the VR app)
  • Animated (Patients who used the animated version of the VR app)

Experiment Design

Clean the raw data from the CSV file. Split the data into the 3 testing groups: control, static, animated. Split each group into male and female. Use histograms and boxplots to visually inspect outliers.

Results Gathering

First, cleaning the data to remove errors such as typos and missing values. We used Descriptive Statistics to examine and look at the data. Looking for outliers in the data. Form a hypothesis based on visual inspection of the data in graphs. Then using Inferential Statistics to make predictions and generalizations based on the data. Performing Hypothesis tests to check the validity of the hypothesis based on the data provided.

Major Findings XXX To do XXX

Findings / Implications XXX To do XXX


Introduction

Topic and Context

Post‐traumatic stress disorder (PTSD) is seen as one of the most common psychiatric disorder to follow after exposure to a traumatic event. It has been recorded (by ptsd.va.gov) that approx. 6% of the population will have PTSD at some point in time. It has been known that trauma-focused cognitive behaviour therapy is the best-validated threat for PTSD. Although not all PTSD patients respond adequately to this type of treatment. There has also been studies that most people with PTSD do not access evidence-based treatment, and this situation is much worse for lower and middle income countries. This identify that there is still a lot to overcome in the style of treatment to better improve people’s lives with PTSD and remains a challenge.

Rationale

While CBT is effective in the management of symptoms of PTSD, it doesn’t specifically deal with the underlying cause. Furthermore, not all patients respond to CBT. Therefore, in an effort to improve the outcomes for patients with PTSD we aim to explore the effectiveness of virtual reality assisted cognitive behavioral therapy compared to standard CBT practices.

Kind of simple. We only have a small amount of information, the change in PTSD Levels after 12 weeks, with one possible variable gender that may influence the outcome. Using 3 different treatment methods, with 2 different ratings.

So, we would expect there is either some change, or no change after 12 weeks. Each of the methods may have different outcomes, and the gender of the patients may be a factor in how they respond to each treatment, or to treatment in general by any of the 3 treatments.

Hypothesis

For a treatment to be a success, the average PTSD levels for both observer rated and self-reported should improve over a 12 week period, across all groups (control, static, animated), and for all patient types (male, female).

H0 (Null hypothesis): There is no difference between the median values of male and female patients measurements over a 12 week period.

H1 (Alternative): There is a difference between the median values of male and female patients measurements over a 12 week period.


Method

Participants

The participants involved in the study were all young adults with PTSD in the age range of 18 - 25 years. There were 150 students, equally divided into 75 males and 75 females.

Design

The patients were allocated into one of three groups;

  • Control, static (traditional CBT, no VR)
  • Static (non-animated model content, VR)
  • Animated (animated model content, VR)

Non-animated means the objects in the virtual environment would be still and not interact. Animated means when you add objects onto the Jungian Sand play they would interact and move around the environment

Materials

The 3 groups underwent 12 weeks of treatment for 50 minutes per week with a therapist. During that time the patients either underwent traditional CBT; or used one of the two (quality) versions of the VR app.

Procedure

During the study, PTSD was assessed using observer-rated (i.e., therapist-rated) and self-report (i.e., Child PTSD Symptom Scale Self-Report Version (CPSS-SR)) measurements, respectively. Both measurements are scaled to the range of 0 to 10. Measurements were taken at the start and end of the study.

Results

Descriptive Statistics

  1. Frequency Distribution
  2. Central Tendency
  3. Variability

1. Frequency Distibution

1.1 Histograms

1.2 Boxplots

2. Central Tendancy

2.1 Mean

2.2 Median

2.3 Mode

3. Variability

3.1 Standard Deviation

Raw Data

Load Raw Data from CSV File

The raw data is loaded from an external CSV file.

csv_file_name = "../daie_ca3_data_5.csv"
raw_data <- read.csv(csv_file_name)

# names(raw_data) # find name for column1, it's called ...1 elsewhere

Explore Raw Data

Get column names

names(raw_data)
## [1] "X"               "gender"          "test_group"      "pre_trial_cpss" 
## [5] "post_trial_cpss" "pre_trial_or"    "post_trial_or"

Get column data type

sapply(raw_data, typeof)
##               X          gender      test_group  pre_trial_cpss post_trial_cpss 
##       "integer"     "character"     "character"        "double"        "double" 
##    pre_trial_or   post_trial_or 
##        "double"        "double"

Raw Data Table

Display the raw data in a paged table.

# show a "prettier" paged table
rmarkdown::paged_table(raw_data)

Rows with values out of Range (0 to 10)

Check for any values less than 0 or greater than 10. Self-Report and Observer-Rated measurements are scaled to the range 0 to 10.

# identify_rows <- raw_data$pre_trial_cpss < 0 | raw_data$pre_trial_cpss > 10 | raw_data$post_trial_cpss < 0 | raw_data$post_trial_cpss > 10 | raw_data$pre_trial_or < 0 | raw_data$pre_trial_or > 10 | raw_data$post_trial_or < 0 | raw_data$post_trial_or > 10

# function to do same thing as above for 1 column at a time
check_range <- function(value) {
  return(value < 0 | value > 10) # return true if the value is less than 0 or greater than 10, otherwise false
}

identify_rows <- check_range(raw_data$pre_trial_cpss) | check_range(raw_data$post_trial_cpss) | check_range(raw_data$pre_trial_or) | check_range(raw_data$post_trial_or)

data_not_in_range <- raw_data %>% 
  select(X, gender, test_group, pre_trial_cpss, post_trial_cpss, pre_trial_or, post_trial_or) %>%
  subset(., identify_rows)

rmarkdown::paged_table(data_not_in_range)

Rows with missing data

Show rows with missing data. We will remove this later.

missing_data <- raw_data %>%
  select(X, gender, test_group, pre_trial_cpss, post_trial_cpss, pre_trial_or, post_trial_or) %>%
  filter(!complete.cases(.))

rmarkdown::paged_table(missing_data)

Values in “gender” should be “Female” and “Male”

Use unique() to find all the different values in the gender column to find/rule out errors

gender_values = unique(raw_data$gender)
gender_values
## [1] "Male"   "Female" "Feale"

Values in test_group should be “Control”, “Static”, “Animated”

Use unique() to find all the different values in the test_group column to find/rule out errors

test_group_values = unique(raw_data$test_group)
test_group_values
## [1] "Static"   "Control"  "Animated" "Anmated"

Show Rows with Typos

After previously finding the typos “Feale” and “Anmated” with unique(), in gender and test_group columns. Show the rows, so we can be sure they were corrected in the cleaned data later.

typos <- raw_data %>%
  select(X, gender, test_group, pre_trial_cpss, post_trial_cpss, pre_trial_or, post_trial_or) %>%
  filter(gender == "Feale" | test_group == "Anmated")
typos

Show Rows with Typos or Missing Data

Show all errors. Only Typos and Missing Data have been identified.

typos <- raw_data %>%
  select(X, gender, test_group, pre_trial_cpss, post_trial_cpss, pre_trial_or, post_trial_or) %>%
  filter(gender == "Feale" | test_group == "Anmated" | !complete.cases(.))
typos

Clean Data

The following has been performed to clean the data:

  • Remove rows with missing data: filter()
    • Row 73: removed, as missing value could skew the results, as we don’t know what value should be. Therefore we can’t replace it.
  • Fix typos: mutate()
    • Row 125: “Anmated” becomes “Animated”.
    • Row 148: “Feale” becomes “Female”.
  • Check for duplicates: distinct()
    • No duplicates found

data <- raw_data %>% 
  select(X, gender, test_group, pre_trial_cpss, post_trial_cpss, pre_trial_or, post_trial_or) %>%
  distinct() %>% # remove duplicates (none anyway)
  filter(complete.cases(.)) %>% # remove rows with incomplete data
  mutate(gender = recode(gender, "Feale" = "Female")) %>% # change typo in gender column
  mutate(test_group = recode(test_group, "Anmated" = "Animated")) # change typo in test_group column
data

Add Columns for Difference in Pre and Post values

Self-Report Measures

data$cpss_diff <- data$pre_trial_cpss - data$post_trial_cpss

Observer-Rated Measures

data$or_diff <- data$pre_trial_or - data$post_trial_or

Table with difference columns

data

Split Clean Data into Groups

The 150 patients are divided into 3 groups of 50 in the Raw Data. Each group had an equal number of male and female participants. In the cleaned data 1 record has been removed.

  • Control (traditional CBT, no VR)
  • Static (non-animated model content, VR)
  • Animated (animated model contend, VR)

Control Group

The control group has 1 less patient record after cleaning the data

control_group <- filter(data, test_group == "Control")
control_group

Static Group

static_group <- filter(data, test_group == "Static")
static_group

Animated Group

animated_group <- filter(data, test_group == "Animated")
animated_group

1. Frequency Distribution

1.1 Histograms

Histograms for each group.

Control

Histogram of Control Group Self-Report (CPPS) Treatment Difference between Start and End
mean_control_cpss <- mean(control_group$cpss_diff)
sd_control_cpss <- sd(control_group$cpss_diff)

# right skewed
hist(control_group$cpss_diff, 
     main="Histogram of Control CPPS Treatment Difference",
     xlab="Control Group: Self-Report (CPPS) Difference",
     ylab="Patient Frequency")

# hist(rnorm(control_group, mean_control_cpss, sd_control_cpss))  # normal distibution (random sample values generated)
Histogram of Control Group Observer-Rated (OR) Treatment Difference between Start and End
mean_control_or <- mean(control_group$or_diff)
sd_control_or <- sd(control_group$or_diff)

# symmetric? / right?
hist(control_group$or_diff, 
     main="Histogram of Control OR Treatment Difference",
     xlab="Control Group: Observer-Rated (OR) Difference",
     ylab="Patient Frequency")

# hist(rnorm(control_group, mean_control_or, sd_control_or))

Static

Histogram of Static Group Self-Report (CPPS) Treatment Difference between Start and End
# left skewed (outliers on right)
hist(static_group$cpss_diff, 
     main="Histogram of Static CPPS Treatment Difference",
     xlab="Static Group: Self-Report (CPPS) Difference",
     ylab="Patient Frequency")

Histogram of Static Group Observer-Rated (OR) Treatment Difference between Start and End
hist(static_group$or_diff, 
     main="Histogram of Static OR Treatment Difference",
     xlab="Static Group: Observer-Rated (OR) Difference",
     ylab="Patient Frequency")


Animated

Histogram of Animated Group Self-Report (CPPS) Treatment Difference between Start and End
# left skewed
hist(animated_group$cpss_diff, 
     main="Histogram of Animated CPPS Treatment Difference",
     xlab="Animated Group: Self-Report (CPPS) Difference",
     ylab="Patient Frequency")

Histogram of Animated Group Observer-Rated (OR) Treatment Difference between Start and End
# left skewed
hist(animated_group$or_diff, 
     main="Histogram of Animated OR Treatment Difference",
     xlab="Animated Group: Observer-Rated (OR) Difference",
     ylab="Patient Frequency")


1.2 Boxplots

Boxplots of each groups treatment difference between Start and End.

Outside the boxplot whiskers, outliers are visible for all groups and for both measurement methods.

Control Group

For the control group, outliers are visible for the whole group for both Self-Report and Observer-Rated measurements. When data is divided into Male and Female, outliers are visible only for Female Observer-Rated.

Self-Report (CPPS)
boxplot(control_group$cpss_diff, 
        main="Control Self-Report (CPSS) Boxplot")

Observer-Rated (OR)
boxplot(control_group$or_diff, 
        main="Control Observer-Rated (OR) Boxplot")

Control - Male
control_male <- filter(control_group, gender == "Male")
control_male
Control Male - Self-Report (CPPS)
boxplot(control_male$cpss_diff, 
        main="Male - Control Self-Report (CPSS) Boxplot")

Control Male - Observer-Rated (OR)
boxplot(control_male$or_diff, 
        main="Male - Control Observer-Rated (OR) Boxplot")

Control - Female
control_female <- filter(control_group, gender == "Female")
control_female
Control Female - Self-Report (CPPS)
boxplot(control_female$cpss_diff, 
        main="Female - Control Self-Report (CPSS) Boxplot")

Control Female - Observer-Rated (OR)
boxplot(control_female$or_diff, 
        main="Female - Control Observer-Rated (OR) Boxplot")


Static Group

For the static group, outliers are visible for the whole group for both Self-Report and Observer-Rated measurements. When data is divided into Male and Female, outliers are visible only for male measurements, and in both Self-Report and Observer-Rated measurements.

Self-Report (CPPS)
boxplot(static_group$cpss_diff, 
        main="Static Self-Report (CPSS) Boxplot")

Observer-Rated (OR)
boxplot(static_group$or_diff, 
        main="Static Observer-Rated (OR) Boxplot")


Static Group Male

Outliers are visible for both male measurement methods.

static_male <- filter(static_group, gender == "Male")
static_male
Static Male - Self-Report (CPPS)
boxplot(static_male$cpss_diff, 
        main="Male - Static Self-Report (CPSS) Boxplot")

Static Male - Observer-Rated (OR)
boxplot(static_male$or_diff, 
        main="Male - Static Observer-Rated (OR) Boxplot")


Static Group Female

No outliers are visible for female measurement methods.

static_female <- filter(static_group, gender == "Female")
static_female
Static Female - Self-Report (CPPS)
boxplot(static_female$cpss_diff, 
        main="Female - Static Self-Report (CPSS) Boxplot")

Static Female - Observer-Rated (OR)
boxplot(static_female$or_diff, 
        main="Female - Static Observer-Rated (OR) Boxplot")


Animated Group

For the animated group, outliers are visible for the whole group for both Self-Report and Observer-Rated measurements. When data is divided into Male and Female, outliers are visible for male Observer-Rated measurements only.

Self-Report (CPPS)
boxplot(animated_group$cpss_diff, 
        main="Animated Self-Report (CPSS) Boxplot")

Observer-Rated (OR)
boxplot(animated_group$or_diff, 
        main="Animated Observer-Rated (OR) Boxplot")


Animated Group Male

Outliers are visible for both male measurement methods.

animated_male <- filter(animated_group, gender == "Male")
animated_male
Animated Male - Self-Report (CPPS)
boxplot(animated_male$cpss_diff, 
        main="Male - Animated Self-Report (CPSS) Boxplot")

Animated Male - Observer-Rated (OR)
boxplot(animated_male$or_diff, 
        main="Male - Animated Observer-Rated (OR) Boxplot")


Animated Group Female

No outliers are visible for female measurement methods.

animated_female <- filter(animated_group, gender == "Female")
animated_female
Animated Female - Self-Report (CPPS)
boxplot(animated_female$cpss_diff, 
        main="Female - Animated Self-Report (CPSS) Boxplot")

Animated Female - Observer-Rated (OR)
boxplot(animated_female$or_diff, 
        main="Female - Animated Observer-Rated (OR) Boxplot")


2. Central Tendancy

Mean, Median, Mode

2.1 Mean

Control Mean Values

Mean Self-Report Difference

mean_control_cpss <- mean(control_group$cpss_diff)
mean_control_cpss
## [1] 0.7865306

Mean Self-Report Difference - Male

mean_control_cpss_male <- mean(control_male$cpss_diff)
mean_control_cpss_male
## [1] 0.815

Mean Self-Report Difference - Female

mean_control_cpss_female <- mean(control_female$cpss_diff)
mean_control_cpss_female
## [1] 0.7592

Mean Observer-Rated Difference

mean_control_or <- mean(control_male$or_diff)
mean_control_or
## [1] 0.9333333

Mean Observer-Rated Difference - Male

mean_control_or_male <- mean(control_female$or_diff)
mean_control_or_male
## [1] 0.874

Mean Observer-Rated Difference - Female

mean_control_or_female <- mean(control_group$or_diff)
mean_control_or_female
## [1] 0.9030612

Static Mean Values

Mean Self-Report Difference

mean_static_cpss <- mean(static_group$cpss_diff)
mean_static_cpss
## [1] 0.664

Mean Self-Report Difference - Male

mean_static_cpss_male <- mean(static_male$cpss_diff)
mean_static_cpss_male
## [1] 0.6664

Mean Self-Report Difference - Female

mean_static_cpss_female <- mean(static_female$cpss_diff)
mean_static_cpss_female
## [1] 0.6616

Mean Observer-Rated Difference

mean_static_or <- mean(static_male$or_diff)
mean_static_or
## [1] 0.7096

Mean Observer-Rated Difference - Male

mean_static_or_male <- mean(static_female$or_diff)
mean_static_or_male
## [1] 0.6752

Mean Observer-Rated Difference - Female

mean_static_or_female <- mean(static_group$or_diff)
mean_static_or_female
## [1] 0.6924

Animated Mean Values

Mean Self-Report Difference

mean_animated_cpss <- mean(animated_group$cpss_diff)
mean_animated_cpss
## [1] 0.6934

Mean Self-Report Difference - Male

mean_animated_cpss_male <- mean(animated_male$cpss_diff)
mean_animated_cpss_male
## [1] 0.5728

Mean Self-Report Difference - Female

mean_animated_cpss_female <- mean(animated_female$cpss_diff)
mean_animated_cpss_female
## [1] 0.814

Mean Observer-Rated Difference

mean_animated_or <- mean(animated_male$or_diff)
mean_animated_or
## [1] 0.6056

Mean Observer-Rated Difference - Male

mean_animated_or_male <- mean(animated_female$or_diff)
mean_animated_or_male
## [1] 0.9592

Mean Observer-Rated Difference - Female

mean_animated_or_female <- mean(animated_group$or_diff)
mean_animated_or_female
## [1] 0.7824

2.2 Median

Control Median Values

Median Self-Report Difference

median_control_cpss <- median(control_group$cpss_diff)
median_control_cpss
## [1] 0.73

Median Self-Report Difference - Male

median_control_cpss_male <- median(control_male$cpss_diff)
median_control_cpss_male
## [1] 1.045

Median Self-Report Difference - Female

median_control_cpss_female <- median(control_female$cpss_diff)
median_control_cpss_female
## [1] 0.66

Median Observer-Rated Difference

median_control_or <- median(control_male$or_diff)
median_control_or
## [1] 0.995

Median Observer-Rated Difference - Male

median_control_or_male <- median(control_female$or_diff)
median_control_or_male
## [1] 0.78

Median Observer-Rated Difference - Female

median_control_or_female <- median(control_group$or_diff)
median_control_or_female
## [1] 0.86

2.3 Mode

Function used to calculate mode (tutorialspoint):

getmode <- function(v) {
  uniqv <- unique(v)
  uniqv[which.max(tabulate(match(v, uniqv)))]
}

Control Mode Values

Mode Self-Report Difference

mode_control_cpss <- getmode(control_group$cpss_diff)
mode_control_cpss
## [1] 1.22

Mode Self-Report Difference - Male

mode_control_cpss_male <- getmode(control_male$cpss_diff)
mode_control_cpss_male
## [1] 1.22

Mode Self-Report Difference - Female

mode_control_cpss_female <- getmode(control_female$cpss_diff)
mode_control_cpss_female
## [1] 0.66

Mode Observer-Rated Difference

mode_control_or <- getmode(control_male$or_diff)
mode_control_or
## [1] 1.7

Mode Observer-Rated Difference - Male

mode_control_or_male <- getmode(control_female$or_diff)
mode_control_or_male
## [1] 0.78

Mode Observer-Rated Difference - Female

mode_control_or_female <- getmode(control_group$or_diff)
mode_control_or_female
## [1] 0.78

3. Central Tendancy

3.1 Standard Deviation

Control Standard Deviation Values

Standard Deviation Self-Report Difference

sd_control_cpss <- sd(control_group$cpss_diff)
sd_control_cpss
## [1] 1.01783

Standard Deviation Self-Report Difference - Male

sd_control_cpss_male <- sd(control_male$cpss_diff)
sd_control_cpss_male
## [1] 1.420441

Standard Deviation Self-Report Difference - Female

sd_control_cpss_female <- sd(control_female$cpss_diff)
sd_control_cpss_female
## [1] 0.3698414

Standard Deviation Observer-Rated Difference

sd_control_or <- sd(control_male$or_diff)
sd_control_or
## [1] 1.481003

Standard Deviation Observer-Rated Difference - Male

sd_control_or_male <- sd(control_female$or_diff)
sd_control_or_male
## [1] 0.4315862

Standard Deviation Observer-Rated Difference - Female

sd_control_or_female <- sd(control_group$or_diff)
sd_control_or_female
## [1] 1.070057

Static Standard Deviation Values

Standard Deviation Self-Report Difference

sd_static_cpss <- sd(static_group$cpss_diff)
sd_static_cpss
## [1] 1.015745

Standard Deviation Self-Report Difference - Male

sd_static_cpss_male <- sd(static_male$cpss_diff)
sd_static_cpss_male
## [1] 1.416609

Standard Deviation Self-Report Difference - Female

sd_static_cpss_female <- sd(static_female$cpss_diff)
sd_static_cpss_female
## [1] 0.3157093

Standard Deviation Observer-Rated Difference

sd_static_or <- sd(static_male$or_diff)
sd_static_or
## [1] 1.647062

Standard Deviation Observer-Rated Difference - Male

sd_static_or_male <- sd(static_female$or_diff)
sd_static_or_male
## [1] 0.4128067

Standard Deviation Observer-Rated Difference - Female

sd_static_or_female <- sd(static_group$or_diff)
sd_static_or_female
## [1] 1.188483

Animated Standard Deviation Values

Standard Deviation Self-Report Difference

sd_animated_cpss <- sd(animated_group$cpss_diff)
sd_animated_cpss
## [1] 0.9568157

Standard Deviation Self-Report Difference - Male

sd_animated_cpss_male <- sd(animated_male$cpss_diff)
sd_animated_cpss_male
## [1] 1.31823

Standard Deviation Self-Report Difference - Female

sd_animated_cpss_female <- sd(animated_female$cpss_diff)
sd_animated_cpss_female
## [1] 0.3179754

Standard Deviation Observer-Rated Difference

sd_animated_or <- sd(animated_male$or_diff)
sd_animated_or
## [1] 1.29165

Standard Deviation Observer-Rated Difference - Male

sd_animated_or_male <- sd(animated_female$or_diff)
sd_animated_or_male
## [1] 0.4911459

Standard Deviation Observer-Rated Difference - Female

sd_animated_or_female <- sd(animated_group$or_diff)
sd_animated_or_female
## [1] 0.9834644

Inferential Statistics

T-test

if(!require("tidyr")) install.packages("tidyr")
## Loading required package: tidyr
library(tidyr)

# 95% confidence level is default setting
data %>% 
  select(gender, cpss_diff) %>% 
  filter(gender %in% c("Male", "Female")) %>% 
  drop_na(cpss_diff) %>% 
  t.test(cpss_diff ~ gender, data = .)
## 
##  Welch Two Sample t-test
## 
## data:  cpss_diff by gender
## t = 0.37796, df = 81.685, p-value = 0.7064
## alternative hypothesis: true difference in means between group Female and group Male is not equal to 0
## 95 percent confidence interval:
##  -0.2641789  0.3880997
## sample estimates:
## mean in group Female   mean in group Male 
##            0.7449333            0.6829730
control_group %>% 
  select(gender, cpss_diff) %>% 
  filter(gender %in% c("Male", "Female")) %>% 
  drop_na(cpss_diff) %>% 
  t.test(cpss_diff ~ gender, data = .)
## 
##  Welch Two Sample t-test
## 
## data:  cpss_diff by gender
## t = -0.18648, df = 25.986, p-value = 0.8535
## alternative hypothesis: true difference in means between group Female and group Male is not equal to 0
## 95 percent confidence interval:
##  -0.6708979  0.5592979
## sample estimates:
## mean in group Female   mean in group Male 
##               0.7592               0.8150
static_group %>% 
  select(gender, cpss_diff) %>% 
  filter(gender %in% c("Male", "Female")) %>% 
  drop_na(cpss_diff) %>% 
  t.test(cpss_diff ~ gender, data = .)
## 
##  Welch Two Sample t-test
## 
## data:  cpss_diff by gender
## t = -0.016536, df = 26.378, p-value = 0.9869
## alternative hypothesis: true difference in means between group Female and group Male is not equal to 0
## 95 percent confidence interval:
##  -0.6010478  0.5914478
## sample estimates:
## mean in group Female   mean in group Male 
##               0.6616               0.6664
animated_group %>% 
  select(gender, cpss_diff) %>% 
  filter(gender %in% c("Male", "Female")) %>% 
  drop_na(cpss_diff) %>% 
  t.test(cpss_diff ~ gender, data = .)
## 
##  Welch Two Sample t-test
## 
## data:  cpss_diff by gender
## t = 0.88936, df = 26.783, p-value = 0.3817
## alternative hypothesis: true difference in means between group Female and group Male is not equal to 0
## 95 percent confidence interval:
##  -0.3154824  0.7978824
## sample estimates:
## mean in group Female   mean in group Male 
##               0.8140               0.5728
data %>% 
  select(gender, or_diff) %>% 
  filter(gender %in% c("Male", "Female")) %>% 
  drop_na(or_diff) %>% 
  t.test(or_diff ~ gender, data = .)
## 
##  Welch Two Sample t-test
## 
## data:  or_diff by gender
## t = 0.49942, df = 86.837, p-value = 0.6187
## alternative hypothesis: true difference in means between group Female and group Male is not equal to 0
## 95 percent confidence interval:
##  -0.2655308  0.4437434
## sample estimates:
## mean in group Female   mean in group Male 
##            0.8361333            0.7470270
control_group %>% 
  select(gender, or_diff) %>% 
  filter(gender %in% c("Male", "Female")) %>% 
  drop_na(or_diff) %>% 
  t.test(or_diff ~ gender, data = .)
## 
##  Welch Two Sample t-test
## 
## data:  or_diff by gender
## t = -0.18873, df = 26.733, p-value = 0.8517
## alternative hypothesis: true difference in means between group Female and group Male is not equal to 0
## 95 percent confidence interval:
##  -0.7047104  0.5860437
## sample estimates:
## mean in group Female   mean in group Male 
##            0.8740000            0.9333333
static_group %>% 
  select(gender, or_diff) %>% 
  filter(gender %in% c("Male", "Female")) %>% 
  drop_na(or_diff) %>% 
  t.test(or_diff ~ gender, data = .)
## 
##  Welch Two Sample t-test
## 
## data:  or_diff by gender
## t = -0.1013, df = 27.003, p-value = 0.9201
## alternative hypothesis: true difference in means between group Female and group Male is not equal to 0
## 95 percent confidence interval:
##  -0.7311997  0.6623997
## sample estimates:
## mean in group Female   mean in group Male 
##               0.6752               0.7096
animated_group %>% 
  select(gender, or_diff) %>% 
  filter(gender %in% c("Male", "Female")) %>% 
  drop_na(or_diff) %>% 
  t.test(or_diff ~ gender, data = .)
## 
##  Welch Two Sample t-test
## 
## data:  or_diff by gender
## t = 1.2794, df = 30.798, p-value = 0.2103
## alternative hypothesis: true difference in means between group Female and group Male is not equal to 0
## 95 percent confidence interval:
##  -0.2102211  0.9174211
## sample estimates:
## mean in group Female   mean in group Male 
##               0.9592               0.6056
data %>% 
  select(gender, cpss_diff) %>% 
  filter(gender %in% c("Male", "Female")) %>% 
  drop_na(cpss_diff) %>% 
  t.test(cpss_diff ~ gender, data = .)
## 
##  Welch Two Sample t-test
## 
## data:  cpss_diff by gender
## t = 0.37796, df = 81.685, p-value = 0.7064
## alternative hypothesis: true difference in means between group Female and group Male is not equal to 0
## 95 percent confidence interval:
##  -0.2641789  0.3880997
## sample estimates:
## mean in group Female   mean in group Male 
##            0.7449333            0.6829730

Statistical Tests

Magnitude and Direction of Results


Discussion

Outline Findings and Relation to the Hypothesis

??? Hypothesis testing conclusion ??? change in anxiety over time + compare 3 groups

Limitations (If confounding variables are clearly identified by your group)


References

OpenIntro Statistics:

M., D., D., C. and Çetinkaya-Rundel, M., 2019. OpenIntro Statistics. OpenIntro, Incorporated.

OpenIntro Statistics. 2022. OpenIntro Statistics. [ONLINE] Available at: https://www.openintro.org/book/os/. [Accessed 21 December 2022].

Tutorialspoint:

R Tutorial. 2022. R Tutorial. [ONLINE] Available at: https://www.tutorialspoint.com/r/index.htm. [Accessed 21 December 2022].

Table of Contents:

Yihui Xie, J. J. Allaire, Garrett Grolemund. 2022. 3.1 HTML document | R Markdown: The Definitive Guide. [ONLINE] Available at: https://bookdown.org/yihui/rmarkdown/html-document.html. [Accessed 21 December 2022].

Cleaning Data

R Programming 101 (YouTube). 2022. Clean your data with R. R programming for beginners. - YouTube. [ONLINE] Available at: https://youtu.be/sV5lwAJ7vnQ. [Accessed 22 December 2022].

T Test

R Programming 101 (YouTube). 2022. Doing a t-test using R programming (in 4 minutes) - YouTube. [ONLINE] Available at: https://www.youtube.com/watch?v=x1RFWHV2VUU. [Accessed 23 December 2022].

Markdown

Markdown Basics. 2022. Markdown Basics. [ONLINE] Available at: https://rmarkdown.rstudio.com/authoring_basics.html. [Accessed 23 December 2022].

PTSD and CBT research

National Library of Medicine. 2022. Post‐traumatic stress disorder: a state‐of‐the‐art review of evidence and challenges. [ONLINE] Available at: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6732680/. [Accessed 23 December 2022].

Cognitive behavioural therapy (CBT) – PTSD UK. 2022. Cognitive behavioural therapy (CBT) – PTSD UK. [ONLINE] Available at: https://www.ptsduk.org/treatment-help/cognitive-behavioural-therapy-cbt/. [Accessed 23 December 2022].

Statistical Analysis

WallStreetMojo. 2022. Statistical Analysis. [ONLINE] Available at: https://www.wallstreetmojo.com/statistical-analysis/. [Accessed 23 December 2022].

Histograms

Data Camp. 2022. How to Make a Histogram with Basic R Tutorial. [ONLINE] Available at: https://www.datacamp.com/tutorial/make-histogram-basic-r. [Accessed 24 December 2022].