SET-UP
– working directory
# set working directory.
setwd("~/okara004@ucr.edu - Google Drive/My Drive/Research/SYP/Data & Analysis")
– libraries
# load libraries.
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(psych)
library(lmtest)
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
library(nortest)
library(car)
## Loading required package: carData
##
## Attaching package: 'car'
## The following object is masked from 'package:psych':
##
## logit
## The following object is masked from 'package:dplyr':
##
## recode
library(gplots)
##
## Attaching package: 'gplots'
## The following object is masked from 'package:stats':
##
## lowess
library(report)
library(ggplot2)
##
## Attaching package: 'ggplot2'
## The following objects are masked from 'package:psych':
##
## %+%, alpha
library(factoextra)
## Welcome! Want to learn more? See two factoextra-related books at https://goo.gl/ve3WBa
library(corrplot)
## corrplot 0.92 loaded
– read data
# read in the data file.
data_01 <- read.csv("Prolific_Data_Numeric_WithIncomplete.csv")
DATA CLEANING
– remove rows
# remove the first two rows, since they're headers and prompts from Qualtrics.
data_02 <- data_01[-c(1, 2), ]
– edit column names
# the duration column was named weirdly, so I'm renaming it.
data_03 <- data_02
names(data_03)[names(data_03) == "Duration..in.seconds."] <- "Duration"
– data types
# I need to change the duration column to numeric data in order to get descriptives.
data_04 <- data_03
data_04$Duration <- as.numeric(data_03$Duration)
# I also need to change all the scale data to numeric, as well as the "Progress" & "Age" columns.
data_04 <- mutate_at(data_04, vars("Emotion_Prediction_1":"ConstrualLevel_25"), as.numeric)
data_04$Progress <- as.numeric(data_04$Progress)
data_04$Age <- as.numeric(data_04$Age)
– score calculations
# calculate each participant's average for PA predictions.
data_05 <- data_04
which(colnames(data_05) %in% c("Emotion_Prediction_1", "Emotion_Prediction_10"))
## [1] 19 28
data_05$PositiveAffect_Prediction <- rowMeans(data_05[, 19:28], na.rm = TRUE)
# calculate each participant's average for NA predictions.
which(colnames(data_05) %in% c("Emotion_Prediction_11", "Emotion_Prediction_20"))
## [1] 29 38
data_05$NegativeAffect_Prediction <- rowMeans(data_05[, 29:38], na.rm = TRUE)
# calculate each participant's average for HA predictions.
high_arousal_columns <- c(paste0("Emotion_Prediction_", c(1:5, 11:15)))
data_05$HighArousal_Prediction <- rowMeans(data_05[high_arousal_columns])
# calculate each participant's average for LA predictions.
low_arousal_columns <- c(paste0("Emotion_Prediction_", c(6:10, 16:20)))
data_05$LowArousal_Prediction <- rowMeans(data_05[low_arousal_columns])
# calculate each participant's average for PA HA predictions.
which(colnames(data_05) %in% c("Emotion_Prediction_1", "Emotion_Prediction_5"))
## [1] 19 23
data_05$PA_HighArousal_Prediction <- rowMeans(data_05[, 19:23], na.rm = TRUE)
# calculate each participant's average for PA LA predictions.
which(colnames(data_05) %in% c("Emotion_Prediction_6", "Emotion_Prediction_10"))
## [1] 24 28
data_05$PA_LowArousal_Prediction <- rowMeans(data_05[, 24:28], na.rm = TRUE)
# calculate each participant's average for NA HA predictions.
which(colnames(data_05) %in% c("Emotion_Prediction_11", "Emotion_Prediction_15"))
## [1] 29 33
data_05$NA_HighArousal_Prediction <- rowMeans(data_05[, 29:33], na.rm = TRUE)
# calculate each participant's average for NA LA predictions.
which(colnames(data_05) %in% c("Emotion_Prediction_16", "Emotion_Prediction_20"))
## [1] 34 38
data_05$NA_LowArousal_Prediction <- rowMeans(data_05[, 34:38], na.rm = TRUE)
# calculate each participant's average construal level based on the BIF.
which(colnames(data_05) %in% c("ConstrualLevel_1", "ConstrualLevel_25"))
## [1] 185 209
data_05$BIF_avg <- rowMeans(data_05[, 185:209], na.rm = TRUE)
– NAs
# turn NaNs into NAs.
data_06 <- data_05
data_06$PositiveAffect_Prediction[is.nan(data_06$PositiveAffect_Prediction)] <- NA
data_06$PositiveAffect_Prediction[is.nan(data_06$NegativeAffect_Prediction)] <- NA
data_06$PositiveAffect_Prediction[is.nan(data_06$HighArousal_Prediction)] <- NA
data_06$PositiveAffect_Prediction[is.nan(data_06$LowArousal_Prediction)] <- NA
data_06$PositiveAffect_Prediction[is.nan(data_06$PA_HighArousal_Prediction)] <- NA
data_06$PositiveAffect_Prediction[is.nan(data_06$PA_LowArousal_Prediction)] <- NA
data_06$PositiveAffect_Prediction[is.nan(data_06$NA_HighArousal_Prediction)] <- NA
data_06$PositiveAffect_Prediction[is.nan(data_06$NA_LowArousal_Prediction)] <- NA
data_06$PositiveAffect_Prediction[is.nan(data_06$BIF_avg)] <- NA
DATA QUALITY
– duplicates
# find people who started the study more than once (starting N = 226).
id_counts <- table(data_06$PROLIFIC_PID)
duplicated_ids <- names(id_counts[id_counts > 1])
duplicated_ids
## [1] "5a541218eedc32000142254b" "5b55c6a2e173e60001963940"
## [3] "5c45ad3793f3690001c46767" "5ef89ca507b0e3040299f1a3"
## [5] "6593efecc1c0b0b4397e09e9" "659b34567fa14c73800c92c4"
## [7] "65ae78fc9cd81e8e26612cb2"
duplicated_data <- data_06[data_06$PROLIFIC_PID %in% duplicated_ids, c("PROLIFIC_PID", "Progress", "StartDate", "EndDate")]
View(duplicated_data)
# remove duplicate responses in which progress was less than 81%. all people who had duplicate responses had one full response, with the exception of one participant whose second response was 81% instead of 100%, so I'm keeping the 81% response.
data_07 <- data_06[!(data_06$PROLIFIC_PID %in% duplicated_ids & data_06$Progress < 81), ]
id_counts_2 <- table(data_07$PROLIFIC_PID)
duplicated_ids_2 <- names(id_counts_2[id_counts_2 > 1])
duplicated_ids_2
## character(0)
### removed 7 people
### new N = 219
– study completion
# determine how many people finished the entire study.
table(data_07$Finished)
##
## 0 1
## 20 199
### 199 finished
### 20 incomplete
– incomplete responses
# look at the various percentages of study progress.
table(data_07$Progress)
##
## 2 6 9 24 26 31 81 100
## 2 3 11 1 1 1 1 199
# remove responses that have less than 9% of the study completed.
data_08 <- data_07
data_08 <- data_08[data_08$Progress >= 9, ]
### removed 5 people
### new N = 214
– bot scores
# look at the various bot scores to see if anyone has less than 0.5.
table(data_08$Q_RecaptchaScore)
##
## 0.800000011920929 0.8999999761581421 1
## 3 5 59 147
### 3 people didn't have scores
### 5 people had a score of .80
### 59 people had a score of .90
### 147 people had a score of 1
– study length
# look at how long it took participants to complete the study (only for people who completed the whole study; N = 199).
describe(subset(data_08, Progress == 100)$Duration / 60)
## vars n mean sd median trimmed mad min max range skew kurtosis
## X1 1 199 31.66 13.09 28.65 29.95 11.66 13.17 83.12 69.95 1.25 1.5
## se
## X1 0.93
### 31min on average to take the study
### minimum 13min
### maximum 83min (1hr 23min)
– attention check #1
# look at what people wrote for the first attention check.
table(data_08$AttentionCheck_1)
##
## 5bf5e3784945af0001645857 5d1cb71122a8840001feb3d9 5eacad39ef271f3206810eeb
## 1 1 1
## 5f47cdcb9603e31f7f6a7dbd 5feb59016d65c5bf98940b28 63cd461c5f597e27b2a054fb
## 1 1 1
## 65b1234c042048a54da4a8a5 water WATER
## 1 204 2
## woda
## 1
### 207 people wrote "water" or something close to it
### 7 people just put their Prolific IDs
### N = 214
# indicate in the data which participants passed/failed attention check #1.
data_09 <- data_08
data_09$AttentionCheck_1_Result <- ifelse(tolower(substr(data_09$AttentionCheck_1, 1, 1)) == "w", "PASS", "FAIL")
table(data_09$AttentionCheck_1_Result)
##
## FAIL PASS
## 7 207
### 207 people passed the attention check
### 7 people failed the attention check
### N = 214
# remove people who didn't pass the first attention check.
data_09 <- filter(data_09, AttentionCheck_1_Result != "FAIL")
### removed 7 people
### new N = 207
– attention check #2
# look at what people put for attention check #2.
table(data_09$AffectIntolerance_28)
##
## 1 2 4
## 1 1 191
### 191 people put 4, the correct answer
### 1 person put 1
### 1 person put 2
### N = 193 (not all people got to the second attention check)
# indicate in the data who passed/failed attention check #2. figure out the Prolific IDs of the participants who failed so you can remove them.
data_10 <- data_09
data_10$AttentionCheck_2_Result <- ifelse(data_10$AffectIntolerance_28 == 4, "PASS", "FAIL")
which(data_10$AttentionCheck_2_Result == "FAIL")
## [1] 3 21
data_10$PROLIFIC_PID[3]
## [1] "5e9053ba2edf2c02e3e22294"
data_10$PROLIFIC_PID[21]
## [1] "63dab24ece887158c2adb6d7"
### 191 people passed this attention check
### 2 people failed this attention check
### N = 193
# remove people who didn't pass the second attention check.
data_11 <- data_10 %>% filter(!(PROLIFIC_PID %in% c("5e9053ba2edf2c02e3e22294", "63dab24ece887158c2adb6d7")))
### removed 2 people
### new N = 205
DESCRIPTIVES
– demographics
# look at the descriptives for age.
describe(data_11$Age)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 190 31.92 10.93 29 30.26 8.9 18 77 59 1.37 1.83 0.79
### N = 190
### M = 31.92
### SD = 10.93
### min = 18
### max = 77
# look at the descriptives for gender.
table(data_11$Gender)
##
## 1 2 3 4
## 15 109 77 2 2
### N = 190
### 109 male (57%)
### 77 female (41%)
### 2 non-binary/third gender (1%)
### 2 prefer not to say (1%)
# look at the descriptives for race/ethnicity.
table(data_11$Race_Ethnicity)
##
## 1 1,5 1,6 2 2,7 4 6 7
## 15 121 1 3 25 1 10 15 14
### N = 190
### 121 white (64%)
### 25 black or african diaspora (13%)
### 15 latino/a/x (8%)
### 14 other (7%)
### 10 asian (5%)
### 5 multiple (3%)
# look at the descriptives for country of residence.
n_country <- nrow(data_11[data_11$Country != "", ])
n_country
## [1] 190
table(data_11$Country)
##
## Spain Australia
## 15 1 1
## Austria belgium canada
## 1 1 3
## Canada Chile Czech Republic
## 12 6 1
## Czech republlic Czechia england
## 1 1 1
## England England (UK) estonia
## 4 1 1
## france France germany
## 2 2 1
## Germany greece Greece
## 9 2 3
## Hungary Israel italy
## 5 3 2
## Italy Latvia mexico
## 10 1 2
## Mexico MEXICO México
## 8 1 2
## Netherlands New Zealand poland
## 1 1 4
## Poland Polish portugal
## 18 1 3
## Portugal Scotland Slovenia
## 12 1 2
## south africa South Africa SOuth Africa
## 4 25 1
## South Africa spain Spain
## 1 1 2
## Switzerland The Netherlands uk
## 1 2 6
## UK United Kingdom United Kingdom - England
## 6 7 1
## USA Wales
## 1 1
### N = 190
### 31 from South Africa (16%)
### 28 from the UK (15%)
### 23 from Poland (12%)
### 15 from Portugal (8%)
### 15 from Canada (8%)
– correlation matrix
# remove rows with NAs.
data_11_complete <- na.omit(data_11)
### N = 183
# compute a correlation matrix and turn it into a data frame.
correlation_matrix <- round(cor(data_11_complete[c("Impatience_1", "PositiveAffect_Prediction",
"NegativeAffect_Prediction", "HighArousal_Prediction",
"LowArousal_Prediction", "PA_HighArousal_Prediction",
"PA_LowArousal_Prediction", "NA_HighArousal_Prediction",
"NA_LowArousal_Prediction", "BIF_avg")]), digits = 2)
correlation_df <- as.data.frame(correlation_matrix)
correlation_df
## Impatience_1 PositiveAffect_Prediction
## Impatience_1 1.00 0.22
## PositiveAffect_Prediction 0.22 1.00
## NegativeAffect_Prediction -0.08 -0.71
## HighArousal_Prediction 0.18 0.23
## LowArousal_Prediction 0.01 0.11
## PA_HighArousal_Prediction 0.24 0.94
## PA_LowArousal_Prediction 0.16 0.90
## NA_HighArousal_Prediction -0.02 -0.57
## NA_LowArousal_Prediction -0.14 -0.74
## BIF_avg 0.17 0.20
## NegativeAffect_Prediction HighArousal_Prediction
## Impatience_1 -0.08 0.18
## PositiveAffect_Prediction -0.71 0.23
## NegativeAffect_Prediction 1.00 0.41
## HighArousal_Prediction 0.41 1.00
## LowArousal_Prediction 0.28 -0.01
## PA_HighArousal_Prediction -0.62 0.41
## PA_LowArousal_Prediction -0.71 -0.03
## NA_HighArousal_Prediction 0.93 0.64
## NA_LowArousal_Prediction 0.87 0.03
## BIF_avg -0.19 0.04
## LowArousal_Prediction PA_HighArousal_Prediction
## Impatience_1 0.01 0.24
## PositiveAffect_Prediction 0.11 0.94
## NegativeAffect_Prediction 0.28 -0.62
## HighArousal_Prediction -0.01 0.41
## LowArousal_Prediction 1.00 -0.08
## PA_HighArousal_Prediction -0.08 1.00
## PA_LowArousal_Prediction 0.32 0.70
## NA_HighArousal_Prediction 0.06 -0.44
## NA_LowArousal_Prediction 0.51 -0.70
## BIF_avg -0.09 0.21
## PA_LowArousal_Prediction NA_HighArousal_Prediction
## Impatience_1 0.16 -0.02
## PositiveAffect_Prediction 0.90 -0.57
## NegativeAffect_Prediction -0.71 0.93
## HighArousal_Prediction -0.03 0.64
## LowArousal_Prediction 0.32 0.06
## PA_HighArousal_Prediction 0.70 -0.44
## PA_LowArousal_Prediction 1.00 -0.62
## NA_HighArousal_Prediction -0.62 1.00
## NA_LowArousal_Prediction -0.66 0.62
## BIF_avg 0.15 -0.14
## NA_LowArousal_Prediction BIF_avg
## Impatience_1 -0.14 0.17
## PositiveAffect_Prediction -0.74 0.20
## NegativeAffect_Prediction 0.87 -0.19
## HighArousal_Prediction 0.03 0.04
## LowArousal_Prediction 0.51 -0.09
## PA_HighArousal_Prediction -0.70 0.21
## PA_LowArousal_Prediction -0.66 0.15
## NA_HighArousal_Prediction 0.62 -0.14
## NA_LowArousal_Prediction 1.00 -0.21
## BIF_avg -0.21 1.00
– cronbach’s alpha
# compute cronbach's alpha for the PA items.
psych::alpha(data_11[, c("Emotion_Prediction_1", "Emotion_Prediction_2", "Emotion_Prediction_3",
"Emotion_Prediction_4", "Emotion_Prediction_5", "Emotion_Prediction_6",
"Emotion_Prediction_7", "Emotion_Prediction_8", "Emotion_Prediction_9",
"Emotion_Prediction_10")])
## Number of categories should be increased in order to count frequencies.
##
## Reliability analysis
## Call: psych::alpha(x = data_11[, c("Emotion_Prediction_1", "Emotion_Prediction_2",
## "Emotion_Prediction_3", "Emotion_Prediction_4", "Emotion_Prediction_5",
## "Emotion_Prediction_6", "Emotion_Prediction_7", "Emotion_Prediction_8",
## "Emotion_Prediction_9", "Emotion_Prediction_10")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.89 0.91 0.92 0.49 9.7 0.011 8.1 1.6 0.53
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.87 0.89 0.91
## Duhachek 0.87 0.89 0.92
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r
## Emotion_Prediction_1 0.87 0.89 0.90 0.47 8.0 0.0135 0.043
## Emotion_Prediction_2 0.88 0.89 0.90 0.48 8.3 0.0131 0.046
## Emotion_Prediction_3 0.87 0.89 0.90 0.46 7.7 0.0135 0.040
## Emotion_Prediction_4 0.88 0.90 0.91 0.49 8.6 0.0127 0.045
## Emotion_Prediction_5 0.89 0.90 0.91 0.50 9.0 0.0121 0.048
## Emotion_Prediction_6 0.92 0.93 0.93 0.58 12.4 0.0083 0.015
## Emotion_Prediction_7 0.89 0.90 0.91 0.51 9.2 0.0120 0.051
## Emotion_Prediction_8 0.87 0.89 0.90 0.47 7.9 0.0133 0.044
## Emotion_Prediction_9 0.89 0.90 0.91 0.50 9.2 0.0121 0.051
## Emotion_Prediction_10 0.87 0.89 0.90 0.47 8.0 0.0133 0.045
## med.r
## Emotion_Prediction_1 0.50
## Emotion_Prediction_2 0.50
## Emotion_Prediction_3 0.50
## Emotion_Prediction_4 0.52
## Emotion_Prediction_5 0.56
## Emotion_Prediction_6 0.59
## Emotion_Prediction_7 0.59
## Emotion_Prediction_8 0.50
## Emotion_Prediction_9 0.56
## Emotion_Prediction_10 0.50
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Emotion_Prediction_1 194 0.84 0.85 0.84 0.80 8.0 2.2
## Emotion_Prediction_2 194 0.80 0.80 0.79 0.74 8.2 2.3
## Emotion_Prediction_3 194 0.88 0.89 0.90 0.85 8.7 1.9
## Emotion_Prediction_4 194 0.75 0.76 0.73 0.68 8.4 2.3
## Emotion_Prediction_5 194 0.71 0.70 0.65 0.61 7.5 2.7
## Emotion_Prediction_6 194 0.34 0.31 0.20 0.18 6.1 2.8
## Emotion_Prediction_7 194 0.66 0.67 0.61 0.58 8.4 1.9
## Emotion_Prediction_8 194 0.85 0.86 0.86 0.81 8.6 1.9
## Emotion_Prediction_9 194 0.68 0.68 0.63 0.60 8.2 2.3
## Emotion_Prediction_10 194 0.84 0.85 0.85 0.80 8.6 2.0
### alpha = .89
# compute cronbach's alpha for the PA HA items.
psych::alpha(data_11[, c("Emotion_Prediction_1", "Emotion_Prediction_2", "Emotion_Prediction_3",
"Emotion_Prediction_4", "Emotion_Prediction_5")])
## Number of categories should be increased in order to count frequencies.
##
## Reliability analysis
## Call: psych::alpha(x = data_11[, c("Emotion_Prediction_1", "Emotion_Prediction_2",
## "Emotion_Prediction_3", "Emotion_Prediction_4", "Emotion_Prediction_5")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.89 0.9 0.89 0.65 9.2 0.012 8.2 1.9 0.64
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.87 0.89 0.92
## Duhachek 0.87 0.89 0.92
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r
## Emotion_Prediction_1 0.85 0.87 0.84 0.62 6.5 0.017 0.0083
## Emotion_Prediction_2 0.87 0.88 0.86 0.65 7.3 0.016 0.0117
## Emotion_Prediction_3 0.85 0.86 0.83 0.61 6.2 0.017 0.0063
## Emotion_Prediction_4 0.88 0.89 0.87 0.66 7.9 0.014 0.0099
## Emotion_Prediction_5 0.90 0.91 0.89 0.71 9.6 0.011 0.0038
## med.r
## Emotion_Prediction_1 0.63
## Emotion_Prediction_2 0.62
## Emotion_Prediction_3 0.62
## Emotion_Prediction_4 0.66
## Emotion_Prediction_5 0.71
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Emotion_Prediction_1 194 0.88 0.89 0.87 0.81 8.0 2.2
## Emotion_Prediction_2 194 0.85 0.85 0.80 0.75 8.2 2.3
## Emotion_Prediction_3 194 0.89 0.91 0.90 0.84 8.7 1.9
## Emotion_Prediction_4 194 0.82 0.83 0.77 0.72 8.4 2.3
## Emotion_Prediction_5 194 0.79 0.76 0.66 0.63 7.5 2.7
### alpha = .89
# compute cronbach's alpha for the PA LA items.
psych::alpha(data_11[, c("Emotion_Prediction_6", "Emotion_Prediction_7", "Emotion_Prediction_8",
"Emotion_Prediction_9", "Emotion_Prediction_10")])
## Number of categories should be increased in order to count frequencies.
##
## Reliability analysis
## Call: psych::alpha(x = data_11[, c("Emotion_Prediction_6", "Emotion_Prediction_7",
## "Emotion_Prediction_8", "Emotion_Prediction_9", "Emotion_Prediction_10")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.75 0.78 0.79 0.42 3.6 0.028 8 1.5 0.43
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.7 0.75 0.80
## Duhachek 0.7 0.75 0.81
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r
## Emotion_Prediction_6 0.83 0.84 0.82 0.56 5.1 0.019 0.022
## Emotion_Prediction_7 0.72 0.76 0.76 0.44 3.1 0.034 0.067
## Emotion_Prediction_8 0.66 0.69 0.66 0.36 2.2 0.040 0.030
## Emotion_Prediction_9 0.69 0.73 0.74 0.40 2.7 0.038 0.060
## Emotion_Prediction_10 0.64 0.67 0.64 0.34 2.1 0.042 0.025
## med.r
## Emotion_Prediction_6 0.54
## Emotion_Prediction_7 0.40
## Emotion_Prediction_8 0.30
## Emotion_Prediction_9 0.35
## Emotion_Prediction_10 0.30
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Emotion_Prediction_6 194 0.57 0.50 0.28 0.26 6.1 2.8
## Emotion_Prediction_7 194 0.68 0.70 0.57 0.50 8.4 1.9
## Emotion_Prediction_8 194 0.80 0.84 0.84 0.69 8.6 1.9
## Emotion_Prediction_9 194 0.76 0.76 0.67 0.58 8.2 2.3
## Emotion_Prediction_10 194 0.84 0.86 0.88 0.73 8.6 2.0
### alpha = .75
# compute cronbach's alpha for the NA items.
psych::alpha(data_11[, c("Emotion_Prediction_11", "Emotion_Prediction_12", "Emotion_Prediction_13",
"Emotion_Prediction_14", "Emotion_Prediction_15", "Emotion_Prediction_16",
"Emotion_Prediction_17", "Emotion_Prediction_18",
"Emotion_Prediction_19", "Emotion_Prediction_20")])
## Number of categories should be increased in order to count frequencies.
##
## Reliability analysis
## Call: psych::alpha(x = data_11[, c("Emotion_Prediction_11", "Emotion_Prediction_12",
## "Emotion_Prediction_13", "Emotion_Prediction_14", "Emotion_Prediction_15",
## "Emotion_Prediction_16", "Emotion_Prediction_17", "Emotion_Prediction_18",
## "Emotion_Prediction_19", "Emotion_Prediction_20")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.88 0.9 0.92 0.48 9.2 0.012 2.1 1.8 0.5
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.86 0.88 0.91
## Duhachek 0.86 0.88 0.91
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r
## Emotion_Prediction_11 0.88 0.90 0.92 0.49 8.7 0.013 0.037
## Emotion_Prediction_12 0.86 0.88 0.91 0.46 7.6 0.014 0.034
## Emotion_Prediction_13 0.90 0.91 0.93 0.54 10.5 0.010 0.025
## Emotion_Prediction_14 0.87 0.89 0.91 0.48 8.2 0.014 0.038
## Emotion_Prediction_15 0.87 0.89 0.91 0.48 8.2 0.014 0.038
## Emotion_Prediction_16 0.87 0.89 0.91 0.48 8.1 0.013 0.035
## Emotion_Prediction_17 0.87 0.88 0.91 0.46 7.6 0.014 0.035
## Emotion_Prediction_18 0.87 0.88 0.90 0.46 7.5 0.014 0.032
## Emotion_Prediction_19 0.88 0.90 0.92 0.50 9.1 0.013 0.036
## Emotion_Prediction_20 0.87 0.89 0.91 0.47 8.0 0.014 0.036
## med.r
## Emotion_Prediction_11 0.52
## Emotion_Prediction_12 0.48
## Emotion_Prediction_13 0.53
## Emotion_Prediction_14 0.49
## Emotion_Prediction_15 0.49
## Emotion_Prediction_16 0.49
## Emotion_Prediction_17 0.47
## Emotion_Prediction_18 0.48
## Emotion_Prediction_19 0.50
## Emotion_Prediction_20 0.47
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Emotion_Prediction_11 194 0.73 0.67 0.63 0.62 3.3 3.3
## Emotion_Prediction_12 194 0.81 0.84 0.83 0.76 1.4 2.2
## Emotion_Prediction_13 194 0.50 0.44 0.34 0.34 4.5 3.3
## Emotion_Prediction_14 194 0.78 0.74 0.72 0.70 2.9 2.9
## Emotion_Prediction_15 194 0.78 0.74 0.73 0.70 2.6 2.8
## Emotion_Prediction_16 194 0.71 0.76 0.73 0.64 1.2 2.1
## Emotion_Prediction_17 194 0.81 0.85 0.84 0.77 1.1 1.9
## Emotion_Prediction_18 194 0.81 0.85 0.86 0.76 1.1 2.0
## Emotion_Prediction_19 194 0.57 0.62 0.56 0.49 1.4 2.0
## Emotion_Prediction_20 194 0.75 0.79 0.76 0.69 1.1 2.0
### alpha = .88
# compute cronbach's alpha for the NA HA items.
psych::alpha(data_11[, c("Emotion_Prediction_11", "Emotion_Prediction_12", "Emotion_Prediction_13",
"Emotion_Prediction_14", "Emotion_Prediction_15")])
## Number of categories should be increased in order to count frequencies.
##
## Reliability analysis
## Call: psych::alpha(x = data_11[, c("Emotion_Prediction_11", "Emotion_Prediction_12",
## "Emotion_Prediction_13", "Emotion_Prediction_14", "Emotion_Prediction_15")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.81 0.82 0.82 0.48 4.6 0.02 2.9 2.2 0.5
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.77 0.81 0.85
## Duhachek 0.77 0.81 0.85
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r
## Emotion_Prediction_11 0.74 0.75 0.74 0.44 3.1 0.030 0.044
## Emotion_Prediction_12 0.80 0.81 0.80 0.51 4.2 0.024 0.047
## Emotion_Prediction_13 0.86 0.86 0.83 0.61 6.2 0.015 0.013
## Emotion_Prediction_14 0.74 0.75 0.72 0.43 3.0 0.029 0.027
## Emotion_Prediction_15 0.74 0.75 0.72 0.42 3.0 0.030 0.028
## med.r
## Emotion_Prediction_11 0.41
## Emotion_Prediction_12 0.53
## Emotion_Prediction_13 0.60
## Emotion_Prediction_14 0.43
## Emotion_Prediction_15 0.43
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Emotion_Prediction_11 194 0.85 0.84 0.80 0.73 3.3 3.3
## Emotion_Prediction_12 194 0.67 0.72 0.60 0.54 1.4 2.2
## Emotion_Prediction_13 194 0.60 0.57 0.38 0.36 4.5 3.3
## Emotion_Prediction_14 194 0.84 0.85 0.84 0.73 2.9 2.9
## Emotion_Prediction_15 194 0.85 0.85 0.84 0.74 2.6 2.8
### alpha = .81
# compute cronbach's alpha for the NA LA items.
psych::alpha(data_11[, c("Emotion_Prediction_16", "Emotion_Prediction_17", "Emotion_Prediction_18",
"Emotion_Prediction_19", "Emotion_Prediction_20")])
## Number of categories should be increased in order to count frequencies.
##
## Reliability analysis
## Call: psych::alpha(x = data_11[, c("Emotion_Prediction_16", "Emotion_Prediction_17",
## "Emotion_Prediction_18", "Emotion_Prediction_19", "Emotion_Prediction_20")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.9 0.9 0.89 0.64 8.7 0.011 1.2 1.7 0.63
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.87 0.9 0.92
## Duhachek 0.87 0.9 0.92
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r
## Emotion_Prediction_16 0.88 0.88 0.86 0.64 7.1 0.014 0.0148
## Emotion_Prediction_17 0.86 0.86 0.83 0.61 6.2 0.016 0.0067
## Emotion_Prediction_18 0.85 0.85 0.82 0.59 5.9 0.017 0.0059
## Emotion_Prediction_19 0.90 0.90 0.88 0.70 9.4 0.011 0.0055
## Emotion_Prediction_20 0.87 0.87 0.86 0.64 7.0 0.014 0.0136
## med.r
## Emotion_Prediction_16 0.63
## Emotion_Prediction_17 0.58
## Emotion_Prediction_18 0.57
## Emotion_Prediction_19 0.71
## Emotion_Prediction_20 0.60
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Emotion_Prediction_16 194 0.84 0.84 0.78 0.74 1.2 2.1
## Emotion_Prediction_17 194 0.88 0.88 0.86 0.81 1.1 1.9
## Emotion_Prediction_18 194 0.90 0.90 0.89 0.84 1.1 2.0
## Emotion_Prediction_19 194 0.75 0.75 0.64 0.61 1.4 2.0
## Emotion_Prediction_20 194 0.84 0.84 0.79 0.74 1.1 2.0
### alpha = .90
## CORRELATION ANALYSES
PART 1: PA & Impatience
# compute a pearson correlation.
corr_1 <- cor.test(data_11$PositiveAffect_Prediction, data_11$Impatience_1, method = "pearson")
corr_1
##
## Pearson's product-moment correlation
##
## data: data_11$PositiveAffect_Prediction and data_11$Impatience_1
## t = 3.1221, df = 189, p-value = 0.002078
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.08206321 0.35236223
## sample estimates:
## cor
## 0.2214622
report(corr_1)
## Effect sizes were labelled following Funder's (2019) recommendations.
##
## The Pearson's product-moment correlation between
## data_11$PositiveAffect_Prediction and data_11$Impatience_1 is positive,
## statistically significant, and medium (r = 0.22, 95% CI [0.08, 0.35], t(189) =
## 3.12, p = 0.002)
### r = .22
### p = .002
### CI = [.08, .35]
### small, positive, significant correlation between PA predictions & impatience.
# compute a spearman correlation, since we're not quite meeting the normality assumption.
corr_1.1 <- cor.test(data_11$PositiveAffect_Prediction, data_11$Impatience_1, method = "spearman")
## Warning in cor.test.default(data_11$PositiveAffect_Prediction,
## data_11$Impatience_1, : Cannot compute exact p-value with ties
corr_1.1
##
## Spearman's rank correlation rho
##
## data: data_11$PositiveAffect_Prediction and data_11$Impatience_1
## S = 808440, p-value = 1.929e-05
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
## rho
## 0.3038373
report(corr_1.1)
## Effect sizes were labelled following Funder's (2019) recommendations.
##
## The Spearman's rank correlation rho between data_11$PositiveAffect_Prediction
## and data_11$Impatience_1 is positive, statistically significant, and large (rho
## = 0.30, S = 8.08e+05, p < .001)
### rho = .30
### p < .0001
### small, positive, significant correlation between PA predictions & impatience. slightly larger than the pearson correlation.
– linearity
# create a scatterplot to see if the data appear to be linear.
plot(data_11$PositiveAffect_Prediction,
data_11$Impatience_1,
xlim = c(0, 10),
ylim = c(0, 10))

### GOOD: looks linear enough to me!
– normality
# look at a histogram of the impatience ratings.
hist(data_11$Impatience_1)

### OKAY: a little skewed but overall okay i think!
# look at a histogram of the PA predictions.
hist(data_11$PositiveAffect_Prediction)

### BAD: looks very skewed.
# run a shapiro-wilk test of normality for the impatience ratings and PA predictions.
shapiro.test(data_11$Impatience_1)
##
## Shapiro-Wilk normality test
##
## data: data_11$Impatience_1
## W = 0.92955, p-value = 4.568e-08
### BAD: p < .0001
shapiro.test(data_11$PositiveAffect_Prediction)
##
## Shapiro-Wilk normality test
##
## data: data_11$PositiveAffect_Prediction
## W = 0.88822, p-value = 9.608e-11
### BAD: p < .0001
# run an anderson-darling test of normality for the impatience ratings and PA predictions.
ad.test(data_11$Impatience_1)
##
## Anderson-Darling normality test
##
## data: data_11$Impatience_1
## A = 3.9476, p-value = 7.29e-10
### BAD: p < .0001
ad.test(data_11$PositiveAffect_Prediction)
##
## Anderson-Darling normality test
##
## data: data_11$PositiveAffect_Prediction
## A = 5.6248, p-value = 6.573e-14
### BAD: p < .0001
– outliers
# look at a boxplot of the impatience ratings.
boxplot(data_11$Impatience_1)

### OKAY: only one outlier!
# look at a boxplot of the PA predictions.
boxplot(data_11$PositiveAffect_Prediction)

### BAD: quite a few outliers; one of them is pretty extreme.
PART 2: PA HA & Impatience
# compute a pearson correlation.
corr_2 <- cor.test(data_11$PA_HighArousal_Prediction, data_11$Impatience_1, method = "pearson")
corr_2
##
## Pearson's product-moment correlation
##
## data: data_11$PA_HighArousal_Prediction and data_11$Impatience_1
## t = 3.3423, df = 192, p-value = 0.0009986
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.09681072 0.36335942
## sample estimates:
## cor
## 0.2344876
report(corr_2)
## Effect sizes were labelled following Funder's (2019) recommendations.
##
## The Pearson's product-moment correlation between
## data_11$PA_HighArousal_Prediction and data_11$Impatience_1 is positive,
## statistically significant, and medium (r = 0.23, 95% CI [0.10, 0.36], t(192) =
## 3.34, p < .001)
### r = .23
### p < .001
### CI = [.10, .36]
### small, positive, significant correlation between PA HA predictions & impatience. very similar correlation to the PA prediction correlation.
# compute a spearman correlation, since we're not quite meeting the normality assumption.
corr_2.1 <- cor.test(data_11$PA_HighArousal_Prediction, data_11$Impatience_1, method = "spearman")
## Warning in cor.test.default(data_11$PA_HighArousal_Prediction,
## data_11$Impatience_1, : Cannot compute exact p-value with ties
corr_2.1
##
## Spearman's rank correlation rho
##
## data: data_11$PA_HighArousal_Prediction and data_11$Impatience_1
## S = 863886, p-value = 4.084e-05
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
## rho
## 0.2900722
report(corr_2.1)
## Effect sizes were labelled following Funder's (2019) recommendations.
##
## The Spearman's rank correlation rho between data_11$PA_HighArousal_Prediction
## and data_11$Impatience_1 is positive, statistically significant, and medium
## (rho = 0.29, S = 8.64e+05, p < .001)
### rho = .29
### p < .0001
### small, positive, significant correlation between PA HA predictions & impatience. a bit larger than the pearson correlation.
– linearity
# create a scatterplot to see if the data appear to be linear.
plot(data_11$PA_HighArousal_Prediction, data_11$Impatience_1,
xlim = c(0, 10),
ylim = c(0, 10),
)

### GOOD: looks linear enough to me!
– normality
# look at a histogram of PA HA predictions.
hist(data_11$PA_HighArousal_Prediction)

### BAD: very skewed.
# run a shapiro-wilk test of normality.
shapiro.test(data_11$PA_HighArousal_Prediction)
##
## Shapiro-Wilk normality test
##
## data: data_11$PA_HighArousal_Prediction
## W = 0.85804, p-value = 1.792e-12
### BAD: p < .0001
# run an anderson-darling test of normality.
ad.test(data_11$PA_HighArousal_Prediction)
##
## Anderson-Darling normality test
##
## data: data_11$PA_HighArousal_Prediction
## A = 7.5864, p-value < 2.2e-16
### BAD:p < .0001
– outliers
# look at a boxplot of PA HA predictions.
boxplot(data_11$PA_HighArousal_Prediction)

### BAD: looks like we have 5 outliers, but only one is really extreme.
PART 3: PA LA & Impatience
# compute a pearson correlation.
corr_3 <- cor.test(data_11$PA_LowArousal_Prediction, data_11$Impatience_1, method = "pearson")
corr_3
##
## Pearson's product-moment correlation
##
## data: data_11$PA_LowArousal_Prediction and data_11$Impatience_1
## t = 2.3124, df = 192, p-value = 0.02181
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.02429711 0.29855999
## sample estimates:
## cor
## 0.1646085
report(corr_3)
## Effect sizes were labelled following Funder's (2019) recommendations.
##
## The Pearson's product-moment correlation between
## data_11$PA_LowArousal_Prediction and data_11$Impatience_1 is positive,
## statistically significant, and small (r = 0.16, 95% CI [0.02, 0.30], t(192) =
## 2.31, p = 0.022)
### r = .16
### p = .022
### CI = [0.02, 0.30]
### small, positive, significant correlation between PA LA predictions & impatience. smaller than the PA HA correlation, though.
# compute a spearman correlation, since we're not quite meeting the normality assumption.
corr_3.1 <- cor.test(data_11$PA_LowArousal_Prediction, data_11$Impatience_1, method = "spearman")
## Warning in cor.test.default(data_11$PA_LowArousal_Prediction,
## data_11$Impatience_1, : Cannot compute exact p-value with ties
corr_3.1
##
## Spearman's rank correlation rho
##
## data: data_11$PA_LowArousal_Prediction and data_11$Impatience_1
## S = 923622, p-value = 0.0007122
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
## rho
## 0.2409826
report(corr_3.1)
## Effect sizes were labelled following Funder's (2019) recommendations.
##
## The Spearman's rank correlation rho between data_11$PA_LowArousal_Prediction
## and data_11$Impatience_1 is positive, statistically significant, and medium
## (rho = 0.24, S = 9.24e+05, p < .001)
### rho = .24
### p = .0007
### small, positive, significant correlation between PA LA predictions & impatience. a bit larger than the pearson correlation.
– linearity
# create a scatterplot to see if the data appear to be linear.
plot(data_11$PA_LowArousal_Prediction, data_11$Impatience_1,
xlim = c(0, 10),
ylim = c(0, 10))

### GOOD: looks linear enough to me!
– normality
# look at a histogram of PA LA predictions.
hist(data_11$PA_LowArousal_Prediction)

### BAD: pretty skewed.
# run a shapiro-wilk test of normality.
shapiro.test(data_11$PA_LowArousal_Prediction)
##
## Shapiro-Wilk normality test
##
## data: data_11$PA_LowArousal_Prediction
## W = 0.91769, p-value = 5.974e-09
### BAD: p < .0001
# run an anderson-darling test of normality.
ad.test(data_11$PA_LowArousal_Prediction)
##
## Anderson-Darling normality test
##
## data: data_11$PA_LowArousal_Prediction
## A = 3.5497, p-value = 6.741e-09
### BAD:p < .0001
– outliers
# look at a boxplot of PA LA predictions.
boxplot(data_11$PA_LowArousal_Prediction)

### BAD: looks like we have 5 outliers, but only one is extreme.
PART 4: NA LA & Impatience
# compute a pearson correlation.
corr_4 <- cor.test(data_11$NA_LowArousal_Prediction, data_11$Impatience_1, method = "pearson")
corr_4
##
## Pearson's product-moment correlation
##
## data: data_11$NA_LowArousal_Prediction and data_11$Impatience_1
## t = -2.0122, df = 192, p-value = 0.0456
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.278935581 -0.002891436
## sample estimates:
## cor
## -0.1437077
report(corr_4)
## Effect sizes were labelled following Funder's (2019) recommendations.
##
## The Pearson's product-moment correlation between
## data_11$NA_LowArousal_Prediction and data_11$Impatience_1 is negative,
## statistically significant, and small (r = -0.14, 95% CI [-0.28, -2.89e-03],
## t(192) = -2.01, p = 0.046)
### r = -.14
### p = .046
### CI = [-0.28, -.003]
### small, negative, significant correlation between NA LA predictions & impatience. p-value is very close to .05, though, and upper limit of confidence interval is very close to 0.
# compute a spearman correlation, since we're not quite meeting the normality assumption.
corr_4.1 <- cor.test(data_11$NA_LowArousal_Prediction, data_11$Impatience_1, method = "spearman")
## Warning in cor.test.default(data_11$NA_LowArousal_Prediction,
## data_11$Impatience_1, : Cannot compute exact p-value with ties
corr_4.1
##
## Spearman's rank correlation rho
##
## data: data_11$NA_LowArousal_Prediction and data_11$Impatience_1
## S = 1423330, p-value = 0.01802
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
## rho
## -0.1696692
report(corr_4.1)
## Effect sizes were labelled following Funder's (2019) recommendations.
##
## The Spearman's rank correlation rho between data_11$NA_LowArousal_Prediction
## and data_11$Impatience_1 is negative, statistically significant, and small (rho
## = -0.17, S = 1.42e+06, p = 0.018)
### rho = -.17
### p = .018
### small, negative, significant correlation between NA LA predictions & impatience. only slightly larger than pearson correlation.
– linearity
# create a scatterplot to see if the data appear to be linear.
plot(data_11$NA_LowArousal_Prediction, data_11$Impatience_1,
xlim = c(0, 10),
ylim = c(0, 10),
)

### GOOD: looks linear enough to me!
– normality
# look at a histogram of NA LA predictions.
hist(data_11$NA_LowArousal_Prediction)

### BAD: very much skewed to the right.
# run a shapiro-wilk test of normality.
shapiro.test(data_11$NA_LowArousal_Prediction)
##
## Shapiro-Wilk normality test
##
## data: data_11$NA_LowArousal_Prediction
## W = 0.72733, p-value < 2.2e-16
### BAD: p < .0001
# run an anderson-darling test of normality.
ad.test(data_11$NA_LowArousal_Prediction)
##
## Anderson-Darling normality test
##
## data: data_11$NA_LowArousal_Prediction
## A = 16.796, p-value < 2.2e-16
### BAD: p < .0001
– outliers
# look at a boxplot of NA LA predictions.
boxplot(data_11$NA_LowArousal_Prediction)

### BAD: looks like we have 10 outliers.
PART 5: HA & Impatience
# compute a pearson correlation.
corr_5 <- cor.test(data_11$HighArousal_Prediction, data_11$Impatience_1, method = "pearson")
corr_5
##
## Pearson's product-moment correlation
##
## data: data_11$HighArousal_Prediction and data_11$Impatience_1
## t = 2.5072, df = 192, p-value = 0.013
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.03813207 0.31112148
## sample estimates:
## cor
## 0.1780505
report(corr_5)
## Effect sizes were labelled following Funder's (2019) recommendations.
##
## The Pearson's product-moment correlation between data_11$HighArousal_Prediction
## and data_11$Impatience_1 is positive, statistically significant, and small (r =
## 0.18, 95% CI [0.04, 0.31], t(192) = 2.51, p = 0.013)
### r = .18
### p = .013
### CI = [.04, .31]
### small, positive, significant correlation between HA predictions & impatience. smaller than overall PA and PA HA predictions, though.
– linearity
# create a scatterplot to see if the data appear to be linear.
plot(data_11$HighArousal_Prediction, data_11$Impatience_1,
xlim = c(0, 10),
ylim = c(0, 10),
)

### GOOD: looks linear enough to me!
– normality
# look at a histogram of HA predictions.
hist(data_11$HighArousal_Prediction, main = "Histogram of High Arousal Predictions", xlab = "Values", ylab = "Frequency")

### GOOD: looks normal!
# run a shapiro-wilk test of normality.
shapiro.test(data_11$HighArousal_Prediction)
##
## Shapiro-Wilk normality test
##
## data: data_11$HighArousal_Prediction
## W = 0.98946, p-value = 0.1638
### GOOD: p = .16
# run an anderson-darling test of normality.
ad.test(data_11$HighArousal_Prediction)
##
## Anderson-Darling normality test
##
## data: data_11$HighArousal_Prediction
## A = 0.4657, p-value = 0.2504
### GOOD: p = .25
– outliers
boxplot(data_11$HighArousal_Prediction)

### BAD: looks like we have 5 outliers.
PART 6: Non-Significant Correlations
# NA Predictions & Impatience
corr_6 <- cor.test(data_11$NegativeAffect_Prediction, data_11$Impatience_1, method = "pearson")
corr_6
##
## Pearson's product-moment correlation
##
## data: data_11$NegativeAffect_Prediction and data_11$Impatience_1
## t = -1.1774, df = 192, p-value = 0.2405
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.2228831 0.0568867
## sample estimates:
## cor
## -0.08466665
report(corr_6)
## Effect sizes were labelled following Funder's (2019) recommendations.
##
## The Pearson's product-moment correlation between
## data_11$NegativeAffect_Prediction and data_11$Impatience_1 is negative,
## statistically not significant, and very small (r = -0.08, 95% CI [-0.22, 0.06],
## t(192) = -1.18, p = 0.240)
# LA Predictions & Impatience
corr_7 <- cor.test(data_11$LowArousal_Prediction, data_11$Impatience_1, method = "pearson")
corr_7
##
## Pearson's product-moment correlation
##
## data: data_11$LowArousal_Prediction and data_11$Impatience_1
## t = 0.13451, df = 192, p-value = 0.8931
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.1313475 0.1503761
## sample estimates:
## cor
## 0.009706932
report(corr_7)
## Effect sizes were labelled following Funder's (2019) recommendations.
##
## The Pearson's product-moment correlation between data_11$LowArousal_Prediction
## and data_11$Impatience_1 is positive, statistically not significant, and tiny
## (r = 9.71e-03, 95% CI [-0.13, 0.15], t(192) = 0.13, p = 0.893)
# NA HA Predictions & Impatience
corr_8 <- cor.test(data_11$NA_HighArousal_Prediction, data_11$Impatience_1, method = "pearson")
corr_8
##
## Pearson's product-moment correlation
##
## data: data_11$NA_HighArousal_Prediction and data_11$Impatience_1
## t = -0.34918, df = 192, p-value = 0.7273
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.1654791 0.1160953
## sample estimates:
## cor
## -0.02519155
report(corr_8)
## Effect sizes were labelled following Funder's (2019) recommendations.
##
## The Pearson's product-moment correlation between
## data_11$NA_HighArousal_Prediction and data_11$Impatience_1 is negative,
## statistically not significant, and tiny (r = -0.03, 95% CI [-0.17, 0.12],
## t(192) = -0.35, p = 0.727)
PART 7: BIF & Impatience
# compute a pearson correlation.
corr_9 <- cor.test(data_11$BIF_avg, data_11$Impatience_1, method = "pearson")
corr_9
##
## Pearson's product-moment correlation
##
## data: data_11$BIF_avg and data_11$Impatience_1
## t = 2.4421, df = 189, p-value = 0.01552
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.0337585 0.3092008
## sample estimates:
## cor
## 0.1748996
report(corr_9)
## Effect sizes were labelled following Funder's (2019) recommendations.
##
## The Pearson's product-moment correlation between data_11$BIF_avg and
## data_11$Impatience_1 is positive, statistically significant, and small (r =
## 0.17, 95% CI [0.03, 0.31], t(189) = 2.44, p = 0.016)
### r = .17
### p = .016
### CI = [.03, .31]
### small, positive, significant correlation between abstract construal & impatience. smaller than the emotion predictions.
– linearity
# create a scatterplot to see if the data appear to be linear.
plot(data_11$BIF_avg, data_11$Impatience_1,
xlim = c(0, 1),
ylim = c(0, 10),
)

### GOOD: looks linear enough to me!
– normality
# look at a histogram of construal level.
hist(data_11$BIF_avg, xlab = "Values", ylab = "Frequency")

### GOOD: looks normal!
# run a shapiro-wilk test of normality.
shapiro.test(data_11$BIF_avg)
##
## Shapiro-Wilk normality test
##
## data: data_11$BIF_avg
## W = 0.98843, p-value = 0.1229
### GOOD: p = .12
# run an anderson-darling test of normality.
ad.test(data_11$BIF_avg)
##
## Anderson-Darling normality test
##
## data: data_11$BIF_avg
## A = 0.58101, p-value = 0.129
### GOOD: p = .129
– outliers
boxplot(data_11$BIF_avg)

### OKAY: only 1 outlier.
## LINEAR REGRESSION ANALYSES
PART 1: PA & Impatience
# run a linear regression model predicting impatience from PA predictions.
model_01 <- lm(Impatience_1 ~ PositiveAffect_Prediction,
data = data_11)
summary(model_01)
##
## Call:
## lm(formula = Impatience_1 ~ PositiveAffect_Prediction, data = data_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.6284 -0.8517 0.2052 1.3848 3.7863
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.04859 0.72930 6.922 6.72e-11 ***
## PositiveAffect_Prediction 0.27740 0.08885 3.122 0.00208 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.946 on 189 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.04905, Adjusted R-squared: 0.04401
## F-statistic: 9.748 on 1 and 189 DF, p-value: 0.002078
report(model_01)
## We fitted a linear model (estimated using OLS) to predict Impatience_1 with
## PositiveAffect_Prediction (formula: Impatience_1 ~ PositiveAffect_Prediction).
## The model explains a statistically significant and weak proportion of variance
## (R2 = 0.05, F(1, 189) = 9.75, p = 0.002, adj. R2 = 0.04). The model's
## intercept, corresponding to PositiveAffect_Prediction = 0, is at 5.05 (95% CI
## [3.61, 6.49], t(189) = 6.92, p < .001). Within this model:
##
## - The effect of PositiveAffect Prediction is statistically significant and
## positive (beta = 0.28, 95% CI [0.10, 0.45], t(189) = 3.12, p = 0.002; Std. beta
## = 0.22, 95% CI [0.08, 0.36])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
### b = 0.28
### p = .0021
### R2 = .049
### PA prediction positively and significantly predicts impatience.
– linearity
# plot the residuals against the predicted values to determine if the data looks linear.
plot(fitted(model_01),
resid(model_01),
abline(h = 0))

### GOOD: looks good enough!
– homoscedasticity
# first check for funneling in the scatterplot above.
### GOOD: no obvious funneling!
# then run a Breusch-Pagan test.
bptest(model_01)
##
## studentized Breusch-Pagan test
##
## data: model_01
## BP = 0.75519, df = 1, p-value = 0.3848
### GOOD: p = .38
– independence
# run a durbin-watson test.
dwtest(model_01)
##
## Durbin-Watson test
##
## data: model_01
## DW = 1.9131, p-value = 0.2715
## alternative hypothesis: true autocorrelation is greater than 0
### GOOD: p = .272
– normality
# look at a histogram of the residuals.
hist(residuals(model_01))

### GOOD: a little skewed, but not too bad i don't think.
# look at a Q-Q plot of the residuals.
qqnorm(residuals(model_01))
qqline(residuals(model_01))

### OKAY: there are several deviations to the left, but the line isn't too curved.
# run a shapiro-wilk test.
shapiro.test(residuals(model_01))
##
## Shapiro-Wilk normality test
##
## data: residuals(model_01)
## W = 0.96376, p-value = 7.785e-05
### BAD: p < .0001
# run an anderson-darling test.
ad.test(residuals(model_01))
##
## Anderson-Darling normality test
##
## data: residuals(model_01)
## A = 1.8223, p-value = 0.0001129
### BAD: p = .0001
PART 2: PA HA & Impatience
# run a linear regression model prediction impatience from PA HA predictions.
model_02 <- lm(Impatience_1 ~ PA_HighArousal_Prediction, data = data_11)
summary(model_02)
##
## Call:
## lm(formula = Impatience_1 ~ PA_HighArousal_Prediction, data = data_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.7133 -0.8513 0.2867 1.3322 4.2570
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.25041 0.61799 8.496 5.37e-15 ***
## PA_HighArousal_Prediction 0.24629 0.07369 3.342 0.000999 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.939 on 192 degrees of freedom
## (11 observations deleted due to missingness)
## Multiple R-squared: 0.05498, Adjusted R-squared: 0.05006
## F-statistic: 11.17 on 1 and 192 DF, p-value: 0.0009986
report(model_02)
## We fitted a linear model (estimated using OLS) to predict Impatience_1 with
## PA_HighArousal_Prediction (formula: Impatience_1 ~ PA_HighArousal_Prediction).
## The model explains a statistically significant and weak proportion of variance
## (R2 = 0.05, F(1, 192) = 11.17, p < .001, adj. R2 = 0.05). The model's
## intercept, corresponding to PA_HighArousal_Prediction = 0, is at 5.25 (95% CI
## [4.03, 6.47], t(192) = 8.50, p < .001). Within this model:
##
## - The effect of PA HighArousal Prediction is statistically significant and
## positive (beta = 0.25, 95% CI [0.10, 0.39], t(192) = 3.34, p < .001; Std. beta
## = 0.23, 95% CI [0.10, 0.37])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
### b = 0.25
### p < .0001
### R2 = .055
### PA HA prediction positively and significantly predicts impatience.
– linearity
# plot the residuals against the predicted values and determine if the data looks linear.
plot(fitted(model_02),
resid(model_02),
abline(h = 0))

### GOOD: looks linear enough to me!
– homoscedasticity
# first check for funneling in the scatterplot above.
### GOOD: no obvious funneling!
# then run a Breusch-Pagan test.
bptest(model_02)
##
## studentized Breusch-Pagan test
##
## data: model_02
## BP = 1.1828, df = 1, p-value = 0.2768
### GOOD: p = .277
– indepedence
# run a durbin-watson test.
dwtest(model_02)
##
## Durbin-Watson test
##
## data: model_02
## DW = 1.8898, p-value = 0.2201
## alternative hypothesis: true autocorrelation is greater than 0
### GOOD: p = .22
– normality
# look at a histogram of the residuals.
hist(residuals(model_02))

### GOOD: a tiny bit skewed, but overall okay.
# look at a Q-Q plot of the residuals.
qqnorm(residuals(model_02))
qqline(residuals(model_02))

### OKAY: there are several deviations to the left, but the line isn't too curved.
# run a shapiro-wilk test.
shapiro.test(residuals(model_02))
##
## Shapiro-Wilk normality test
##
## data: residuals(model_02)
## W = 0.96826, p-value = 0.0002229
### BAD: p = .0002
# run an anderson-darling test.
ad.test(residuals(model_02))
##
## Anderson-Darling normality test
##
## data: residuals(model_02)
## A = 1.7363, p-value = 0.0001839
### BAD: p = .00018
PART 3: PA LA & Impatience
# run a linear regression model predicting impatience from PA LA predictions.
model_03 <- lm(Impatience_1 ~ PA_LowArousal_Prediction, data = data_11)
summary(model_03)
##
## Call:
## lm(formula = Impatience_1 ~ PA_LowArousal_Prediction, data = data_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.396 -1.005 0.245 1.393 3.745
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.57890 0.74180 7.521 2.04e-12 ***
## PA_LowArousal_Prediction 0.21129 0.09137 2.312 0.0218 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.967 on 192 degrees of freedom
## (11 observations deleted due to missingness)
## Multiple R-squared: 0.0271, Adjusted R-squared: 0.02203
## F-statistic: 5.347 on 1 and 192 DF, p-value: 0.02181
report(model_03)
## We fitted a linear model (estimated using OLS) to predict Impatience_1 with
## PA_LowArousal_Prediction (formula: Impatience_1 ~ PA_LowArousal_Prediction).
## The model explains a statistically significant and weak proportion of variance
## (R2 = 0.03, F(1, 192) = 5.35, p = 0.022, adj. R2 = 0.02). The model's
## intercept, corresponding to PA_LowArousal_Prediction = 0, is at 5.58 (95% CI
## [4.12, 7.04], t(192) = 7.52, p < .001). Within this model:
##
## - The effect of PA LowArousal Prediction is statistically significant and
## positive (beta = 0.21, 95% CI [0.03, 0.39], t(192) = 2.31, p = 0.022; Std. beta
## = 0.16, 95% CI [0.02, 0.31])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
### b = 0.21
### p = .0218
### R2 = .027
### PA LA prediction positively and significantly predicts impatience.
– linearity
# plot the residuals against the predicted values and determine if the data looks linear.
plot(fitted(model_03),
resid(model_03),
abline(h = 0))

### GOOD: looks linear enough to me!
– homoscedasticity
# first check for funneling in the scatterplot above.
### GOOD: no obvious funneling!
# then run a Breusch-Pagan test.
bptest(model_03)
##
## studentized Breusch-Pagan test
##
## data: model_03
## BP = 0.26243, df = 1, p-value = 0.6085
### GOOD: p = .61
– independence
# run a durbin-watson test.
dwtest(model_03)
##
## Durbin-Watson test
##
## data: model_03
## DW = 1.9277, p-value = 0.3036
## alternative hypothesis: true autocorrelation is greater than 0
### GOOD: p = .30
– normality
# look at a histogram of the residuals.
hist(residuals(model_03))

### GOOD: a tiny bit skewed, but overall okay.
# look at a Q-Q plot of the residuals.
qqnorm(residuals(model_03))
qqline(residuals(model_03))

### OKAY: there are several deviations to the left, but the line isn't too curved.
# run a shapiro-wilk test.
shapiro.test(residuals(model_03))
##
## Shapiro-Wilk normality test
##
## data: residuals(model_03)
## W = 0.96101, p-value = 3.383e-05
### BAD: p < .0001
# run an anderson-darling test.
ad.test(residuals(model_03))
##
## Anderson-Darling normality test
##
## data: residuals(model_03)
## A = 1.8637, p-value = 8.936e-05
### BAD: p < .0001
PART 4: NA LA & Impatience
# run a linear regression model predicting impatience from NA LA predictions.
model_04 <- lm(Impatience_1 ~ NA_LowArousal_Prediction, data = data_11)
summary(model_04)
##
## Call:
## lm(formula = Impatience_1 ~ NA_LowArousal_Prediction, data = data_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.4635 -1.1069 0.1404 1.5365 3.6574
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.4635 0.1733 43.076 <2e-16 ***
## NA_LowArousal_Prediction -0.1698 0.0844 -2.012 0.0456 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.974 on 192 degrees of freedom
## (11 observations deleted due to missingness)
## Multiple R-squared: 0.02065, Adjusted R-squared: 0.01555
## F-statistic: 4.049 on 1 and 192 DF, p-value: 0.0456
report(model_04)
## We fitted a linear model (estimated using OLS) to predict Impatience_1 with
## NA_LowArousal_Prediction (formula: Impatience_1 ~ NA_LowArousal_Prediction).
## The model explains a statistically significant and weak proportion of variance
## (R2 = 0.02, F(1, 192) = 4.05, p = 0.046, adj. R2 = 0.02). The model's
## intercept, corresponding to NA_LowArousal_Prediction = 0, is at 7.46 (95% CI
## [7.12, 7.81], t(192) = 43.08, p < .001). Within this model:
##
## - The effect of NA LowArousal Prediction is statistically significant and
## negative (beta = -0.17, 95% CI [-0.34, -3.36e-03], t(192) = -2.01, p = 0.046;
## Std. beta = -0.14, 95% CI [-0.28, -2.84e-03])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
### b = -0.17
### p = .046
### R2 = .0207
### NA LA prediction negatively and significantly predicts impatience.
– linearity
# plot the residuals against the predicted values and determine if the data looks linear.
plot(fitted(model_04),
resid(model_04),
abline(h = 0))

### GOOD: looks linear enough to me!
– homoscedasticity
# first check for funneling in the scatterplot above.
### GOOD: no obvious funneling!
# then run a Breusch-Pagan test.
bptest(model_04)
##
## studentized Breusch-Pagan test
##
## data: model_04
## BP = 1.5448, df = 1, p-value = 0.2139
### GOOD: p = .214
– independence
# run a durbin-watson test.
dwtest(model_04)
##
## Durbin-Watson test
##
## data: model_04
## DW = 1.917, p-value = 0.2802
## alternative hypothesis: true autocorrelation is greater than 0
### GOOD: p = .28
– normality
# look at a histogram of the residuals.
hist(residuals(model_04), main = "Histogram of Residuals", xlab = "Residuals")

### GOOD: a tiny bit skewed, but overall okay.
# look at a Q-Q plot of the residuals.
qqnorm(residuals(model_04))
qqline(residuals(model_04))

### OKAY: there are some deviations on the left and right but nothing too bad. there are some weird patterns, though.
# run a shapiro-wilk test.
shapiro.test(residuals(model_04))
##
## Shapiro-Wilk normality test
##
## data: residuals(model_04)
## W = 0.95822, p-value = 1.717e-05
### BAD: p < .0001
# run an anderson-darling test.
ad.test(residuals(model_04))
##
## Anderson-Darling normality test
##
## data: residuals(model_04)
## A = 2.2188, p-value = 1.2e-05
### BAD: p < .0001
PART 5: HA & Impatience
# run a linear regression model predicting impatience from HA predictions.
model_05 <- lm(Impatience_1 ~ HighArousal_Prediction, data = data_11)
summary(model_05)
##
## Call:
## lm(formula = Impatience_1 ~ HighArousal_Prediction, data = data_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.2775 -1.0500 0.1051 1.2732 3.9250
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.4575 0.7337 7.438 3.31e-12 ***
## HighArousal_Prediction 0.3250 0.1296 2.507 0.013 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.962 on 192 degrees of freedom
## (11 observations deleted due to missingness)
## Multiple R-squared: 0.0317, Adjusted R-squared: 0.02666
## F-statistic: 6.286 on 1 and 192 DF, p-value: 0.013
report(model_05)
## We fitted a linear model (estimated using OLS) to predict Impatience_1 with
## HighArousal_Prediction (formula: Impatience_1 ~ HighArousal_Prediction). The
## model explains a statistically significant and weak proportion of variance (R2
## = 0.03, F(1, 192) = 6.29, p = 0.013, adj. R2 = 0.03). The model's intercept,
## corresponding to HighArousal_Prediction = 0, is at 5.46 (95% CI [4.01, 6.90],
## t(192) = 7.44, p < .001). Within this model:
##
## - The effect of HighArousal Prediction is statistically significant and
## positive (beta = 0.32, 95% CI [0.07, 0.58], t(192) = 2.51, p = 0.013; Std. beta
## = 0.18, 95% CI [0.04, 0.32])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
### b = 0.325
### p = .013
### R2 = .032
### HA prediction positively and significantly predicts impatience.
– linearity
# plot the residuals against the predicted values and determine if the data looks linear.
plot(fitted(model_05),
resid(model_05),
abline(h = 0))

### GOOD: looks linear enough to me!
– homoscedasticity
# first check for funneling in the scatterplot above.
### GOOD: no obvious funneling!
# run a Breusch-Pagan test.
bptest(model_05)
##
## studentized Breusch-Pagan test
##
## data: model_05
## BP = 0.81989, df = 1, p-value = 0.3652
### GOOD: p = .365
– independence
# run a durbin-watson test.
dwtest(model_05)
##
## Durbin-Watson test
##
## data: model_05
## DW = 1.9322, p-value = 0.3166
## alternative hypothesis: true autocorrelation is greater than 0
### GOOD: p = .317
– normality
# look at a histogram of the residuals.
hist(residuals(model_05))

### GOOD: a tiny bit skewed, but overall okay.
# look at a Q-Q plot of the residuals.
qqnorm(residuals(model_05))
qqline(residuals(model_05))

### OKAY: many deviations on the left, but doesn't look too curved.
# run a shapiro-wilk test.
shapiro.test(residuals(model_05))
##
## Shapiro-Wilk normality test
##
## data: residuals(model_05)
## W = 0.96553, p-value = 0.0001073
### BAD: p = .0001
# run an anderson-darling test.
ad.test(residuals(model_05))
##
## Anderson-Darling normality test
##
## data: residuals(model_05)
## A = 1.5517, p-value = 0.0005236
### BAD: p = .0005
PART 6: BIF & Impatience
# run a linear regression predicting impatience from construal level.
model_12 <- lm(Impatience_1 ~ BIF_avg, data = data_11)
summary(model_12)
##
## Call:
## lm(formula = Impatience_1 ~ BIF_avg, data = data_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.4964 -1.1396 0.1458 1.3966 3.6452
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.2121 0.4609 13.479 <2e-16 ***
## BIF_avg 1.7838 0.7304 2.442 0.0155 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.965 on 189 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.03059, Adjusted R-squared: 0.02546
## F-statistic: 5.964 on 1 and 189 DF, p-value: 0.01552
report(model_12)
## We fitted a linear model (estimated using OLS) to predict Impatience_1 with
## BIF_avg (formula: Impatience_1 ~ BIF_avg). The model explains a statistically
## significant and weak proportion of variance (R2 = 0.03, F(1, 189) = 5.96, p =
## 0.016, adj. R2 = 0.03). The model's intercept, corresponding to BIF_avg = 0, is
## at 6.21 (95% CI [5.30, 7.12], t(189) = 13.48, p < .001). Within this model:
##
## - The effect of BIF avg is statistically significant and positive (beta = 1.78,
## 95% CI [0.34, 3.22], t(189) = 2.44, p = 0.016; Std. beta = 0.17, 95% CI [0.03,
## 0.32])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
### b = 1.78
### p = .016
### R2 = .031
### abstract construal positively and significantly predicts impatience.
– linearity
# plot the residuals against the predicted values and determine if the data looks linear.
plot(fitted(model_12),
resid(model_12),
abline(h = 0))

### GOOD: looks linear enough to me!
– homoscedasticity
# first check for funneling in the scatterplot above.
### GOOD: no obvious funneling!
# then run a Breusch-Pagan test.
bptest(model_12)
##
## studentized Breusch-Pagan test
##
## data: model_12
## BP = 0.99346, df = 1, p-value = 0.3189
### GOOD: p = .319
– independence
# run a durbin-watson test.
dwtest(model_12)
##
## Durbin-Watson test
##
## data: model_12
## DW = 2.0306, p-value = 0.5809
## alternative hypothesis: true autocorrelation is greater than 0
### GOOD: p = .581
– normality
# look at a histogram of the residuals.
hist(residuals(model_12))

### GOOD: a tiny bit skewed, but overall okay.
# look at a Q-Q plot of the residuals.
qqnorm(residuals(model_12))
qqline(residuals(model_12))

### OKAY: deviations on the left and right, but not too terrible and not very curved.
# run a shapiro-wilk test.
shapiro.test(residuals(model_12))
##
## Shapiro-Wilk normality test
##
## data: residuals(model_12)
## W = 0.96543, p-value = 0.0001196
### BAD: p = .0001
# run an anderson-darling test.
ad.test(residuals(model_12))
##
## Anderson-Darling normality test
##
## data: residuals(model_12)
## A = 1.311, p-value = 0.002053
### BAD: p = .002
## MULTIPLE REGRESSION ANALYSES
PART 1: 10 PA Emotions & Impatience
# run a multiple regression predicting impatience from each individual PA emotion.
model_06 <- lm(Impatience_1 ~ Emotion_Prediction_1 + Emotion_Prediction_2 + Emotion_Prediction_3 +
Emotion_Prediction_4 + Emotion_Prediction_5 + Emotion_Prediction_6 + Emotion_Prediction_7 +
Emotion_Prediction_8 + Emotion_Prediction_9 + Emotion_Prediction_10,
data = data_11)
summary(model_06)
##
## Call:
## lm(formula = Impatience_1 ~ Emotion_Prediction_1 + Emotion_Prediction_2 +
## Emotion_Prediction_3 + Emotion_Prediction_4 + Emotion_Prediction_5 +
## Emotion_Prediction_6 + Emotion_Prediction_7 + Emotion_Prediction_8 +
## Emotion_Prediction_9 + Emotion_Prediction_10, data = data_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.932 -0.868 0.108 1.272 4.140
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.24484 0.76839 6.826 1.24e-10 ***
## Emotion_Prediction_1 -0.15128 0.11866 -1.275 0.20397
## Emotion_Prediction_2 0.33425 0.09873 3.385 0.00087 ***
## Emotion_Prediction_3 0.06408 0.16494 0.388 0.69810
## Emotion_Prediction_4 -0.06345 0.09332 -0.680 0.49742
## Emotion_Prediction_5 0.08377 0.06926 1.209 0.22807
## Emotion_Prediction_6 -0.02943 0.05240 -0.562 0.57511
## Emotion_Prediction_7 0.06357 0.09153 0.694 0.48825
## Emotion_Prediction_8 -0.07017 0.14395 -0.487 0.62649
## Emotion_Prediction_9 0.13689 0.08046 1.701 0.09056 .
## Emotion_Prediction_10 -0.12007 0.13478 -0.891 0.37418
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.904 on 183 degrees of freedom
## (11 observations deleted due to missingness)
## Multiple R-squared: 0.1312, Adjusted R-squared: 0.08372
## F-statistic: 2.764 on 10 and 183 DF, p-value: 0.003369
report(model_06)
## We fitted a linear model (estimated using OLS) to predict Impatience_1 with
## Emotion_Prediction_1, Emotion_Prediction_2, Emotion_Prediction_3,
## Emotion_Prediction_4, Emotion_Prediction_5, Emotion_Prediction_6,
## Emotion_Prediction_7, Emotion_Prediction_8, Emotion_Prediction_9 and
## Emotion_Prediction_10 (formula: Impatience_1 ~ Emotion_Prediction_1 +
## Emotion_Prediction_2 + Emotion_Prediction_3 + Emotion_Prediction_4 +
## Emotion_Prediction_5 + Emotion_Prediction_6 + Emotion_Prediction_7 +
## Emotion_Prediction_8 + Emotion_Prediction_9 + Emotion_Prediction_10). The model
## explains a statistically significant and moderate proportion of variance (R2 =
## 0.13, F(10, 183) = 2.76, p = 0.003, adj. R2 = 0.08). The model's intercept,
## corresponding to Emotion_Prediction_1 = 0, Emotion_Prediction_2 = 0,
## Emotion_Prediction_3 = 0, Emotion_Prediction_4 = 0, Emotion_Prediction_5 = 0,
## Emotion_Prediction_6 = 0, Emotion_Prediction_7 = 0, Emotion_Prediction_8 = 0,
## Emotion_Prediction_9 = 0 and Emotion_Prediction_10 = 0, is at 5.24 (95% CI
## [3.73, 6.76], t(183) = 6.83, p < .001). Within this model:
##
## - The effect of Emotion Prediction 1 is statistically non-significant and
## negative (beta = -0.15, 95% CI [-0.39, 0.08], t(183) = -1.27, p = 0.204; Std.
## beta = -0.16, 95% CI [-0.42, 0.09])
## - The effect of Emotion Prediction 2 is statistically significant and positive
## (beta = 0.33, 95% CI [0.14, 0.53], t(183) = 3.39, p < .001; Std. beta = 0.38,
## 95% CI [0.16, 0.60])
## - The effect of Emotion Prediction 3 is statistically non-significant and
## positive (beta = 0.06, 95% CI [-0.26, 0.39], t(183) = 0.39, p = 0.698; Std.
## beta = 0.06, 95% CI [-0.25, 0.37])
## - The effect of Emotion Prediction 4 is statistically non-significant and
## negative (beta = -0.06, 95% CI [-0.25, 0.12], t(183) = -0.68, p = 0.497; Std.
## beta = -0.07, 95% CI [-0.28, 0.14])
## - The effect of Emotion Prediction 5 is statistically non-significant and
## positive (beta = 0.08, 95% CI [-0.05, 0.22], t(183) = 1.21, p = 0.228; Std.
## beta = 0.11, 95% CI [-0.07, 0.30])
## - The effect of Emotion Prediction 6 is statistically non-significant and
## negative (beta = -0.03, 95% CI [-0.13, 0.07], t(183) = -0.56, p = 0.575; Std.
## beta = -0.04, 95% CI [-0.18, 0.10])
## - The effect of Emotion Prediction 7 is statistically non-significant and
## positive (beta = 0.06, 95% CI [-0.12, 0.24], t(183) = 0.69, p = 0.488; Std.
## beta = 0.06, 95% CI [-0.11, 0.24])
## - The effect of Emotion Prediction 8 is statistically non-significant and
## negative (beta = -0.07, 95% CI [-0.35, 0.21], t(183) = -0.49, p = 0.626; Std.
## beta = -0.07, 95% CI [-0.33, 0.20])
## - The effect of Emotion Prediction 9 is statistically non-significant and
## positive (beta = 0.14, 95% CI [-0.02, 0.30], t(183) = 1.70, p = 0.091; Std.
## beta = 0.16, 95% CI [-0.02, 0.33])
## - The effect of Emotion Prediction 10 is statistically non-significant and
## negative (beta = -0.12, 95% CI [-0.39, 0.15], t(183) = -0.89, p = 0.374; Std.
## beta = -0.12, 95% CI [-0.38, 0.15])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
### excitement is the only significant predictor of impatience amongst the 10 PA emotions.
### b = 0.334
### p = .0009
### R2 = .131
– linearity
# plot the residuals against the predicted values and determine if the data looks linear.
plot(fitted(model_06),
resid(model_06),
abline(h = 0))

### GOOD: looks linear enough to me!
– homoscedasticity
# first check for funneling in the scatterplot above.
### GOOD: no obvious funneling!
# then run a Breusch-Pagan test.
bptest(model_06)
##
## studentized Breusch-Pagan test
##
## data: model_06
## BP = 7.4324, df = 10, p-value = 0.6841
### GOOD: p = .684
– independence
# run a durbin-watson test.
dwtest(model_06)
##
## Durbin-Watson test
##
## data: model_06
## DW = 1.9674, p-value = 0.4067
## alternative hypothesis: true autocorrelation is greater than 0
### GOOD: p = .407
– normality
# look at a histogram of the residuals.
hist(residuals(model_06))

### OKAY: a little skewed, but not too bad i don't think.
# look at a Q-Q plot of the residuals.
qqnorm(residuals(model_06))
qqline(residuals(model_06))

### OKAY: deviations on the left, but doesn't look too curved.
# run a shapiro-wilk test.
shapiro.test(residuals(model_06))
##
## Shapiro-Wilk normality test
##
## data: residuals(model_06)
## W = 0.97015, p-value = 0.0003749
### BAD: p = .0004
# run an anderson-darling test.
ad.test(residuals(model_06))
##
## Anderson-Darling normality test
##
## data: residuals(model_06)
## A = 1.3449, p-value = 0.001694
### BAD: p = .0017
– multicollinearity
# determine variance inflation factor for each IV.
vif(model_06)
## Emotion_Prediction_1 Emotion_Prediction_2 Emotion_Prediction_3
## 3.522323 2.666830 5.078223
## Emotion_Prediction_4 Emotion_Prediction_5 Emotion_Prediction_6
## 2.363570 1.818803 1.106096
## Emotion_Prediction_7 Emotion_Prediction_8 Emotion_Prediction_9
## 1.646774 3.873325 1.750104
## Emotion_Prediction_10
## 3.803208
### happy is the only one with a value above 5.
# since emotion #3 (happy) is pretty high, see what it correlates with by examining a correlation matrix.
matrix <- cor(model.matrix(model_06)[,-1])
matrix_rounded <- round(matrix, 2)
as.data.frame(matrix_rounded)
## Emotion_Prediction_1 Emotion_Prediction_2
## Emotion_Prediction_1 1.00 0.71
## Emotion_Prediction_2 0.71 1.00
## Emotion_Prediction_3 0.81 0.71
## Emotion_Prediction_4 0.64 0.65
## Emotion_Prediction_5 0.61 0.53
## Emotion_Prediction_6 0.12 0.10
## Emotion_Prediction_7 0.49 0.56
## Emotion_Prediction_8 0.68 0.61
## Emotion_Prediction_9 0.50 0.43
## Emotion_Prediction_10 0.68 0.61
## Emotion_Prediction_3 Emotion_Prediction_4
## Emotion_Prediction_1 0.81 0.64
## Emotion_Prediction_2 0.71 0.65
## Emotion_Prediction_3 1.00 0.72
## Emotion_Prediction_4 0.72 1.00
## Emotion_Prediction_5 0.60 0.50
## Emotion_Prediction_6 0.13 0.04
## Emotion_Prediction_7 0.56 0.42
## Emotion_Prediction_8 0.78 0.64
## Emotion_Prediction_9 0.49 0.39
## Emotion_Prediction_10 0.76 0.60
## Emotion_Prediction_5 Emotion_Prediction_6
## Emotion_Prediction_1 0.61 0.12
## Emotion_Prediction_2 0.53 0.10
## Emotion_Prediction_3 0.60 0.13
## Emotion_Prediction_4 0.50 0.04
## Emotion_Prediction_5 1.00 0.07
## Emotion_Prediction_6 0.07 1.00
## Emotion_Prediction_7 0.35 0.20
## Emotion_Prediction_8 0.57 0.20
## Emotion_Prediction_9 0.43 0.23
## Emotion_Prediction_10 0.47 0.22
## Emotion_Prediction_7 Emotion_Prediction_8
## Emotion_Prediction_1 0.49 0.68
## Emotion_Prediction_2 0.56 0.61
## Emotion_Prediction_3 0.56 0.78
## Emotion_Prediction_4 0.42 0.64
## Emotion_Prediction_5 0.35 0.57
## Emotion_Prediction_6 0.20 0.20
## Emotion_Prediction_7 1.00 0.49
## Emotion_Prediction_8 0.49 1.00
## Emotion_Prediction_9 0.37 0.57
## Emotion_Prediction_10 0.51 0.81
## Emotion_Prediction_9 Emotion_Prediction_10
## Emotion_Prediction_1 0.50 0.68
## Emotion_Prediction_2 0.43 0.61
## Emotion_Prediction_3 0.49 0.76
## Emotion_Prediction_4 0.39 0.60
## Emotion_Prediction_5 0.43 0.47
## Emotion_Prediction_6 0.23 0.22
## Emotion_Prediction_7 0.37 0.51
## Emotion_Prediction_8 0.57 0.81
## Emotion_Prediction_9 1.00 0.61
## Emotion_Prediction_10 0.61 1.00
### happy correlates highly (above .7) with cheerful, excited, proud, pleased, and satisfied.
PART 2: 5 PA HA Emotions & Impatience
# run a multiple regression predicting impatience from each individual PA HA emotion.
model_07 <- lm(Impatience_1 ~ Emotion_Prediction_1 + Emotion_Prediction_2 + Emotion_Prediction_3 +
Emotion_Prediction_4 + Emotion_Prediction_5,
data = data_11)
summary(model_07)
##
## Call:
## lm(formula = Impatience_1 ~ Emotion_Prediction_1 + Emotion_Prediction_2 +
## Emotion_Prediction_3 + Emotion_Prediction_4 + Emotion_Prediction_5,
## data = data_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.7401 -0.8669 0.1532 1.2599 4.4881
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.438524 0.657073 8.277 2.29e-14 ***
## Emotion_Prediction_1 -0.138996 0.116809 -1.190 0.235569
## Emotion_Prediction_2 0.349569 0.094417 3.702 0.000281 ***
## Emotion_Prediction_3 -0.001744 0.144051 -0.012 0.990355
## Emotion_Prediction_4 -0.075780 0.091442 -0.829 0.408309
## Emotion_Prediction_5 0.097106 0.066945 1.451 0.148574
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.899 on 188 degrees of freedom
## (11 observations deleted due to missingness)
## Multiple R-squared: 0.1117, Adjusted R-squared: 0.08809
## F-statistic: 4.729 on 5 and 188 DF, p-value: 0.0004307
report(model_07)
## We fitted a linear model (estimated using OLS) to predict Impatience_1 with
## Emotion_Prediction_1, Emotion_Prediction_2, Emotion_Prediction_3,
## Emotion_Prediction_4 and Emotion_Prediction_5 (formula: Impatience_1 ~
## Emotion_Prediction_1 + Emotion_Prediction_2 + Emotion_Prediction_3 +
## Emotion_Prediction_4 + Emotion_Prediction_5). The model explains a
## statistically significant and weak proportion of variance (R2 = 0.11, F(5, 188)
## = 4.73, p < .001, adj. R2 = 0.09). The model's intercept, corresponding to
## Emotion_Prediction_1 = 0, Emotion_Prediction_2 = 0, Emotion_Prediction_3 = 0,
## Emotion_Prediction_4 = 0 and Emotion_Prediction_5 = 0, is at 5.44 (95% CI
## [4.14, 6.73], t(188) = 8.28, p < .001). Within this model:
##
## - The effect of Emotion Prediction 1 is statistically non-significant and
## negative (beta = -0.14, 95% CI [-0.37, 0.09], t(188) = -1.19, p = 0.236; Std.
## beta = -0.15, 95% CI [-0.40, 0.10])
## - The effect of Emotion Prediction 2 is statistically significant and positive
## (beta = 0.35, 95% CI [0.16, 0.54], t(188) = 3.70, p < .001; Std. beta = 0.40,
## 95% CI [0.19, 0.61])
## - The effect of Emotion Prediction 3 is statistically non-significant and
## negative (beta = -1.74e-03, 95% CI [-0.29, 0.28], t(188) = -0.01, p = 0.990;
## Std. beta = -1.64e-03, 95% CI [-0.27, 0.27])
## - The effect of Emotion Prediction 4 is statistically non-significant and
## negative (beta = -0.08, 95% CI [-0.26, 0.10], t(188) = -0.83, p = 0.408; Std.
## beta = -0.09, 95% CI [-0.29, 0.12])
## - The effect of Emotion Prediction 5 is statistically non-significant and
## positive (beta = 0.10, 95% CI [-0.03, 0.23], t(188) = 1.45, p = 0.149; Std.
## beta = 0.13, 95% CI [-0.05, 0.31])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
### once again, excitement stands out as the only significant predictor of impatience amongst the PA HA emotions.
### b = 0.35
### p = .0003
### R2 = 0.112
– linearity
# plot the residuals against the predicted values and determine if the data looks linear.
plot(fitted(model_07),
resid(model_07),
abline(h = 0))

### GOOD: looks linear enough to me!
– homoscedasticity
# first check for funneling in the scatterplot above.
### GOOD: no obvious funneling!
# then run a Breusch-Pagan test.
bptest(model_07)
##
## studentized Breusch-Pagan test
##
## data: model_07
## BP = 3.4885, df = 5, p-value = 0.6251
### GOOD: p = .625
– independence
# run a durbin-watson test.
dwtest(model_07)
##
## Durbin-Watson test
##
## data: model_07
## DW = 1.9481, p-value = 0.3546
## alternative hypothesis: true autocorrelation is greater than 0
### GOOD: p = .355
– normality
# look at a histogram of the residuals.
hist(residuals(model_07))

### GOOD: looks good to me!
# look at a Q-Q plot of the residuals.
qqnorm(residuals(model_07))
qqline(residuals(model_07))

### BAD: deviations on the left, but not too curved.
# run a shapiro-wilk test.
shapiro.test(residuals(model_07))
##
## Shapiro-Wilk normality test
##
## data: residuals(model_07)
## W = 0.97457, p-value = 0.001341
### BAD: p = .0013
# run an anderson-darling test.
ad.test(residuals(model_07))
##
## Anderson-Darling normality test
##
## data: residuals(model_07)
## A = 1.2327, p-value = 0.003205
### BAD: p = .0032
– multicollinearity
# determine variance inflation factor for each IV.
vif(model_07)
## Emotion_Prediction_1 Emotion_Prediction_2 Emotion_Prediction_3
## 3.429571 2.450452 3.891738
## Emotion_Prediction_4 Emotion_Prediction_5
## 2.280196 1.707232
### GOOD: none of the emotions have a VIF about 5!
PART 3: PA HA + PA LA & Impatience
# run a multiple regression predicting impatience from the composite PA HA and PA LA variables.
model_08 <- lm(Impatience_1 ~ PA_HighArousal_Prediction + PA_LowArousal_Prediction,
data = data_11)
summary(model_08)
##
## Call:
## lm(formula = Impatience_1 ~ PA_HighArousal_Prediction + PA_LowArousal_Prediction,
## data = data_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.7133 -0.8513 0.2867 1.3323 4.2571
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.251e+00 7.459e-01 7.039 3.39e-11 ***
## PA_HighArousal_Prediction 2.463e-01 1.037e-01 2.374 0.0186 *
## PA_LowArousal_Prediction -3.601e-05 1.268e-01 0.000 0.9998
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.944 on 191 degrees of freedom
## (11 observations deleted due to missingness)
## Multiple R-squared: 0.05498, Adjusted R-squared: 0.04509
## F-statistic: 5.557 on 2 and 191 DF, p-value: 0.004513
report(model_08)
## We fitted a linear model (estimated using OLS) to predict Impatience_1 with
## PA_HighArousal_Prediction and PA_LowArousal_Prediction (formula: Impatience_1 ~
## PA_HighArousal_Prediction + PA_LowArousal_Prediction). The model explains a
## statistically significant and weak proportion of variance (R2 = 0.05, F(2, 191)
## = 5.56, p = 0.005, adj. R2 = 0.05). The model's intercept, corresponding to
## PA_HighArousal_Prediction = 0 and PA_LowArousal_Prediction = 0, is at 5.25 (95%
## CI [3.78, 6.72], t(191) = 7.04, p < .001). Within this model:
##
## - The effect of PA HighArousal Prediction is statistically significant and
## positive (beta = 0.25, 95% CI [0.04, 0.45], t(191) = 2.37, p = 0.019; Std. beta
## = 0.23, 95% CI [0.04, 0.43])
## - The effect of PA LowArousal Prediction is statistically non-significant and
## negative (beta = -3.60e-05, 95% CI [-0.25, 0.25], t(191) = -2.84e-04, p > .999;
## Std. beta = -2.81e-05, 95% CI [-0.19, 0.19])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
### PA HA emotions are a significant predictor of impatience whereas PA LA emotions are not, when both are considered simultaneously.
### b = 0.246
### p = .0186
### R2 = 0.055
– linearity
# plot the residuals against the predicted values and determine if the data looks linear.
plot(fitted(model_08),
resid(model_08),
abline(h = 0))

### GOOD: looks linear enough to me!
– homoscedasticity
# first check for funneling in the scatterplot above.
### GOOD: no obvious funneling!
# then run a Breusch-Pagan test.
bptest(model_08)
##
## studentized Breusch-Pagan test
##
## data: model_08
## BP = 1.4743, df = 2, p-value = 0.4785
### GOOD: p = .479
– independence
# run a durbin-watson test.
dwtest(model_08)
##
## Durbin-Watson test
##
## data: model_08
## DW = 1.8898, p-value = 0.2177
## alternative hypothesis: true autocorrelation is greater than 0
### GOOD: p = .218
– normality
# look at a histogram of the residuals.
hist(residuals(model_08))

### GOOD: looks good to me!
# look at a Q-Q plot of the residuals.
qqnorm(residuals(model_08))
qqline(residuals(model_08))

### OKAY: deviations on the left, but not too curved.
# run a shapiro-wilk test.
shapiro.test(residuals(model_08))
##
## Shapiro-Wilk normality test
##
## data: residuals(model_08)
## W = 0.96826, p-value = 0.0002229
### BAD: p = .0002
# run an anderson-darling test.
ad.test(residuals(model_08))
##
## Anderson-Darling normality test
##
## data: residuals(model_08)
## A = 1.7363, p-value = 0.0001839
### BAD: p = .00018
– multicollinearity
# determine variance inflation factor for each IV.
vif(model_08)
## PA_HighArousal_Prediction PA_LowArousal_Prediction
## 1.971915 1.971915
### GOOD: neither have a VIF above 5!
PART 4: 5 NA LA Emotions & Impatience
# run a multiple regression predicting impatience from each NA LA emotion individually.
model_09 <- lm(Impatience_1 ~ Emotion_Prediction_16 + Emotion_Prediction_17 + Emotion_Prediction_18 +
Emotion_Prediction_19 + Emotion_Prediction_20,
data = data_11)
summary(model_09)
##
## Call:
## lm(formula = Impatience_1 ~ Emotion_Prediction_16 + Emotion_Prediction_17 +
## Emotion_Prediction_18 + Emotion_Prediction_19 + Emotion_Prediction_20,
## data = data_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.5419 -1.1715 0.4052 1.4980 4.1237
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.54192 0.17572 42.921 <2e-16 ***
## Emotion_Prediction_16 -0.15045 0.10296 -1.461 0.1456
## Emotion_Prediction_17 -0.16505 0.13967 -1.182 0.2388
## Emotion_Prediction_18 0.31308 0.13743 2.278 0.0239 *
## Emotion_Prediction_19 -0.15599 0.09006 -1.732 0.0849 .
## Emotion_Prediction_20 -0.05343 0.10610 -0.504 0.6151
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.954 on 188 degrees of freedom
## (11 observations deleted due to missingness)
## Multiple R-squared: 0.06018, Adjusted R-squared: 0.03519
## F-statistic: 2.408 on 5 and 188 DF, p-value: 0.03821
report(model_09)
## We fitted a linear model (estimated using OLS) to predict Impatience_1 with
## Emotion_Prediction_16, Emotion_Prediction_17, Emotion_Prediction_18,
## Emotion_Prediction_19 and Emotion_Prediction_20 (formula: Impatience_1 ~
## Emotion_Prediction_16 + Emotion_Prediction_17 + Emotion_Prediction_18 +
## Emotion_Prediction_19 + Emotion_Prediction_20). The model explains a
## statistically significant and weak proportion of variance (R2 = 0.06, F(5, 188)
## = 2.41, p = 0.038, adj. R2 = 0.04). The model's intercept, corresponding to
## Emotion_Prediction_16 = 0, Emotion_Prediction_17 = 0, Emotion_Prediction_18 =
## 0, Emotion_Prediction_19 = 0 and Emotion_Prediction_20 = 0, is at 7.54 (95% CI
## [7.20, 7.89], t(188) = 42.92, p < .001). Within this model:
##
## - The effect of Emotion Prediction 16 is statistically non-significant and
## negative (beta = -0.15, 95% CI [-0.35, 0.05], t(188) = -1.46, p = 0.146; Std.
## beta = -0.16, 95% CI [-0.37, 0.05])
## - The effect of Emotion Prediction 17 is statistically non-significant and
## negative (beta = -0.17, 95% CI [-0.44, 0.11], t(188) = -1.18, p = 0.239; Std.
## beta = -0.16, 95% CI [-0.42, 0.10])
## - The effect of Emotion Prediction 18 is statistically significant and positive
## (beta = 0.31, 95% CI [0.04, 0.58], t(188) = 2.28, p = 0.024; Std. beta = 0.32,
## 95% CI [0.04, 0.60])
## - The effect of Emotion Prediction 19 is statistically non-significant and
## negative (beta = -0.16, 95% CI [-0.33, 0.02], t(188) = -1.73, p = 0.085; Std.
## beta = -0.16, 95% CI [-0.33, 0.02])
## - The effect of Emotion Prediction 20 is statistically non-significant and
## negative (beta = -0.05, 95% CI [-0.26, 0.16], t(188) = -0.50, p = 0.615; Std.
## beta = -0.05, 95% CI [-0.27, 0.16])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
### dissatisfied stands out as the only significant predictor of impatience amongst the NA LA emotions. but it positively predicts impatience, which is weird.
### b = 0.313
### p = .0239
### R2 = .06
– linearity
# plot the residuals against the predicted values and determine if the data looks linear.
plot(fitted(model_09),
resid(model_09),
abline(h = 0))

### GOOD: looks linear enough to me!
– homoscedasticity
# first check for funneling in the scatterplot above.
### GOOD: no obvious funneling!
# then run a Breusch-Pagan test.
bptest(model_09)
##
## studentized Breusch-Pagan test
##
## data: model_09
## BP = 3.8261, df = 5, p-value = 0.5747
### GOOD: p = .575
– independence
# run a durbin-watson test.
dwtest(model_09)
##
## Durbin-Watson test
##
## data: model_09
## DW = 1.9408, p-value = 0.3423
## alternative hypothesis: true autocorrelation is greater than 0
### GOOD: p = .342
– normality
# look at a histogram of the residuals.
hist(residuals(model_09))

### GOOD: looks good to me!
# look at a Q-Q plot of the residuals.
qqnorm(residuals(model_09))
qqline(residuals(model_09))

### OKAY: deviations on the upper right, but not too bad i don't think.
# run a shapiro-wilk test.
shapiro.test(residuals(model_09))
##
## Shapiro-Wilk normality test
##
## data: residuals(model_09)
## W = 0.95961, p-value = 2.398e-05
### BAD: p < .0001
# run an anderson-darling test.
ad.test(residuals(model_09))
##
## Anderson-Darling normality test
##
## data: residuals(model_09)
## A = 2.092, p-value = 2.456e-05
### BAD: p < .0001
– multicollinearity
# determine variance inflation factor for each IV.
vif(model_09)
## Emotion_Prediction_16 Emotion_Prediction_17 Emotion_Prediction_18
## 2.295479 3.505190 3.925002
## Emotion_Prediction_19 Emotion_Prediction_20
## 1.613960 2.349338
### GOOD: none are above 5!
PART 5: 10 HA Emotions & Impatience
# run a multiple regression predicting impatience from the 10 HA emotions individually.
model_10 <- lm(Impatience_1 ~ Emotion_Prediction_1 + Emotion_Prediction_2 + Emotion_Prediction_3 +
Emotion_Prediction_4 + Emotion_Prediction_5 + Emotion_Prediction_11 +
Emotion_Prediction_12 + Emotion_Prediction_13 + Emotion_Prediction_14 +
Emotion_Prediction_15,
data = data_11)
summary(model_10)
##
## Call:
## lm(formula = Impatience_1 ~ Emotion_Prediction_1 + Emotion_Prediction_2 +
## Emotion_Prediction_3 + Emotion_Prediction_4 + Emotion_Prediction_5 +
## Emotion_Prediction_11 + Emotion_Prediction_12 + Emotion_Prediction_13 +
## Emotion_Prediction_14 + Emotion_Prediction_15, data = data_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.6162 -0.9215 0.1262 1.2357 4.9590
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.3993473 0.9958754 4.418 1.71e-05 ***
## Emotion_Prediction_1 -0.1452854 0.1207565 -1.203 0.230481
## Emotion_Prediction_2 0.3968186 0.1010618 3.926 0.000122 ***
## Emotion_Prediction_3 0.0668329 0.1538710 0.434 0.664551
## Emotion_Prediction_4 -0.0744924 0.0925285 -0.805 0.421821
## Emotion_Prediction_5 0.0956583 0.0675427 1.416 0.158398
## Emotion_Prediction_11 -0.0009836 0.0639533 -0.015 0.987746
## Emotion_Prediction_12 0.1290060 0.0911766 1.415 0.158796
## Emotion_Prediction_13 -0.0297402 0.0455648 -0.653 0.514768
## Emotion_Prediction_14 0.0570504 0.0810187 0.704 0.482226
## Emotion_Prediction_15 -0.0379586 0.0844222 -0.450 0.653511
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.909 on 183 degrees of freedom
## (11 observations deleted due to missingness)
## Multiple R-squared: 0.1269, Adjusted R-squared: 0.0792
## F-statistic: 2.66 on 10 and 183 DF, p-value: 0.004686
report(model_10)
## We fitted a linear model (estimated using OLS) to predict Impatience_1 with
## Emotion_Prediction_1, Emotion_Prediction_2, Emotion_Prediction_3,
## Emotion_Prediction_4, Emotion_Prediction_5, Emotion_Prediction_11,
## Emotion_Prediction_12, Emotion_Prediction_13, Emotion_Prediction_14 and
## Emotion_Prediction_15 (formula: Impatience_1 ~ Emotion_Prediction_1 +
## Emotion_Prediction_2 + Emotion_Prediction_3 + Emotion_Prediction_4 +
## Emotion_Prediction_5 + Emotion_Prediction_11 + Emotion_Prediction_12 +
## Emotion_Prediction_13 + Emotion_Prediction_14 + Emotion_Prediction_15). The
## model explains a statistically significant and weak proportion of variance (R2
## = 0.13, F(10, 183) = 2.66, p = 0.005, adj. R2 = 0.08). The model's intercept,
## corresponding to Emotion_Prediction_1 = 0, Emotion_Prediction_2 = 0,
## Emotion_Prediction_3 = 0, Emotion_Prediction_4 = 0, Emotion_Prediction_5 = 0,
## Emotion_Prediction_11 = 0, Emotion_Prediction_12 = 0, Emotion_Prediction_13 =
## 0, Emotion_Prediction_14 = 0 and Emotion_Prediction_15 = 0, is at 4.40 (95% CI
## [2.43, 6.36], t(183) = 4.42, p < .001). Within this model:
##
## - The effect of Emotion Prediction 1 is statistically non-significant and
## negative (beta = -0.15, 95% CI [-0.38, 0.09], t(183) = -1.20, p = 0.230; Std.
## beta = -0.16, 95% CI [-0.42, 0.10])
## - The effect of Emotion Prediction 2 is statistically significant and positive
## (beta = 0.40, 95% CI [0.20, 0.60], t(183) = 3.93, p < .001; Std. beta = 0.45,
## 95% CI [0.22, 0.68])
## - The effect of Emotion Prediction 3 is statistically non-significant and
## positive (beta = 0.07, 95% CI [-0.24, 0.37], t(183) = 0.43, p = 0.665; Std.
## beta = 0.06, 95% CI [-0.22, 0.35])
## - The effect of Emotion Prediction 4 is statistically non-significant and
## negative (beta = -0.07, 95% CI [-0.26, 0.11], t(183) = -0.81, p = 0.422; Std.
## beta = -0.08, 95% CI [-0.29, 0.12])
## - The effect of Emotion Prediction 5 is statistically non-significant and
## positive (beta = 0.10, 95% CI [-0.04, 0.23], t(183) = 1.42, p = 0.158; Std.
## beta = 0.13, 95% CI [-0.05, 0.31])
## - The effect of Emotion Prediction 11 is statistically non-significant and
## negative (beta = -9.84e-04, 95% CI [-0.13, 0.13], t(183) = -0.02, p = 0.988;
## Std. beta = -1.61e-03, 95% CI [-0.21, 0.21])
## - The effect of Emotion Prediction 12 is statistically non-significant and
## positive (beta = 0.13, 95% CI [-0.05, 0.31], t(183) = 1.41, p = 0.159; Std.
## beta = 0.14, 95% CI [-0.06, 0.34])
## - The effect of Emotion Prediction 13 is statistically non-significant and
## negative (beta = -0.03, 95% CI [-0.12, 0.06], t(183) = -0.65, p = 0.515; Std.
## beta = -0.05, 95% CI [-0.20, 0.10])
## - The effect of Emotion Prediction 14 is statistically non-significant and
## positive (beta = 0.06, 95% CI [-0.10, 0.22], t(183) = 0.70, p = 0.482; Std.
## beta = 0.08, 95% CI [-0.15, 0.32])
## - The effect of Emotion Prediction 15 is statistically non-significant and
## negative (beta = -0.04, 95% CI [-0.20, 0.13], t(183) = -0.45, p = 0.654; Std.
## beta = -0.05, 95% CI [-0.29, 0.18])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
### excitement is the only HA emotion significantly predicting impatience.
### b = 0.397
### p = .0001
### R2 = .127
– linearity
# plot the residuals against the predicted values and determine if the data looks linear.
plot(fitted(model_10),
resid(model_10),
abline(h = 0))

### GOOD: looks linear enough to me!
– homoscedasticity
# first check for funneling in the scatterplot above.
### GOOD: no obvious funneling!
# then run a Breusch-Pagan test.
bptest(model_10)
##
## studentized Breusch-Pagan test
##
## data: model_10
## BP = 8.7647, df = 10, p-value = 0.5546
### GOOD: p = .555
– independence
# run a durbin-watson test.
dwtest(model_10)
##
## Durbin-Watson test
##
## data: model_10
## DW = 1.9503, p-value = 0.366
## alternative hypothesis: true autocorrelation is greater than 0
### GOOD: p = .366
– normality
# look at a histogram of the residuals.
hist(residuals(model_10))

### GOOD: looks good to me!
# look at a Q-Q plot of the residuals.
qqnorm(residuals(model_10))
qqline(residuals(model_10))

### OKAY: deivations on the lower left, but not too curved overall.
# run a shapiro-wilk test.
shapiro.test(residuals(model_10))
##
## Shapiro-Wilk normality test
##
## data: residuals(model_10)
## W = 0.97607, p-value = 0.002098
### BAD: p = .0021
# run an anderson-darling test.
ad.test(residuals(model_10))
##
## Anderson-Darling normality test
##
## data: residuals(model_10)
## A = 1.1614, p-value = 0.004809
### BAD: p = .0048
– multicollinearity
# determine variance inflation factor for each IV.
vif(model_10)
## Emotion_Prediction_1 Emotion_Prediction_2 Emotion_Prediction_3
## 3.629928 2.780411 4.397597
## Emotion_Prediction_4 Emotion_Prediction_5 Emotion_Prediction_11
## 2.312188 1.721103 2.299992
## Emotion_Prediction_12 Emotion_Prediction_13 Emotion_Prediction_14
## 2.074888 1.212771 3.003072
## Emotion_Prediction_15
## 3.049959
### GOOD: none are above 5!
PART 6: 5 PA LA Emotions & Impatience
# run a multiple regression predicting impatience from the 5 PA LA emotions individually.
model_11 <- lm(Impatience_1 ~ Emotion_Prediction_6 + Emotion_Prediction_7 + Emotion_Prediction_8 +
Emotion_Prediction_9 + Emotion_Prediction_10,
data = data_11)
summary(model_11)
##
## Call:
## lm(formula = Impatience_1 ~ Emotion_Prediction_6 + Emotion_Prediction_7 +
## Emotion_Prediction_8 + Emotion_Prediction_9 + Emotion_Prediction_10,
## data = data_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.8903 -0.9901 0.1992 1.3809 3.5525
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.26300 0.76794 6.853 1e-10 ***
## Emotion_Prediction_6 -0.04534 0.05307 -0.854 0.3939
## Emotion_Prediction_7 0.17295 0.08673 1.994 0.0476 *
## Emotion_Prediction_8 0.02772 0.13045 0.212 0.8320
## Emotion_Prediction_9 0.15294 0.08063 1.897 0.0594 .
## Emotion_Prediction_10 -0.07728 0.13035 -0.593 0.5540
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.955 on 188 degrees of freedom
## (11 observations deleted due to missingness)
## Multiple R-squared: 0.05883, Adjusted R-squared: 0.0338
## F-statistic: 2.35 on 5 and 188 DF, p-value: 0.0425
report(model_11)
## We fitted a linear model (estimated using OLS) to predict Impatience_1 with
## Emotion_Prediction_6, Emotion_Prediction_7, Emotion_Prediction_8,
## Emotion_Prediction_9 and Emotion_Prediction_10 (formula: Impatience_1 ~
## Emotion_Prediction_6 + Emotion_Prediction_7 + Emotion_Prediction_8 +
## Emotion_Prediction_9 + Emotion_Prediction_10). The model explains a
## statistically significant and weak proportion of variance (R2 = 0.06, F(5, 188)
## = 2.35, p = 0.043, adj. R2 = 0.03). The model's intercept, corresponding to
## Emotion_Prediction_6 = 0, Emotion_Prediction_7 = 0, Emotion_Prediction_8 = 0,
## Emotion_Prediction_9 = 0 and Emotion_Prediction_10 = 0, is at 5.26 (95% CI
## [3.75, 6.78], t(188) = 6.85, p < .001). Within this model:
##
## - The effect of Emotion Prediction 6 is statistically non-significant and
## negative (beta = -0.05, 95% CI [-0.15, 0.06], t(188) = -0.85, p = 0.394; Std.
## beta = -0.06, 95% CI [-0.21, 0.08])
## - The effect of Emotion Prediction 7 is statistically significant and positive
## (beta = 0.17, 95% CI [1.87e-03, 0.34], t(188) = 1.99, p = 0.048; Std. beta =
## 0.17, 95% CI [1.80e-03, 0.33])
## - The effect of Emotion Prediction 8 is statistically non-significant and
## positive (beta = 0.03, 95% CI [-0.23, 0.29], t(188) = 0.21, p = 0.832; Std.
## beta = 0.03, 95% CI [-0.22, 0.27])
## - The effect of Emotion Prediction 9 is statistically non-significant and
## positive (beta = 0.15, 95% CI [-6.11e-03, 0.31], t(188) = 1.90, p = 0.059; Std.
## beta = 0.17, 95% CI [-6.92e-03, 0.35])
## - The effect of Emotion Prediction 10 is statistically non-significant and
## negative (beta = -0.08, 95% CI [-0.33, 0.18], t(188) = -0.59, p = 0.554; Std.
## beta = -0.08, 95% CI [-0.33, 0.18])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
### gratitude is the only PA LA emotion significantly predicting impatience.
### b = 0.173
### p = .0476
### R2 = .0588
– linearity
# plot the residuals against the predicted values and determine if the data looks linear.
plot(fitted(model_11),
resid(model_11),
abline(h = 0))

### GOOD: looks linear enough to me!
– homoscedasticity
# first check for funneling in the scatterplot above.
### GOOD: no obvious funneling!
# then run a Breusch-Pagan test.
bptest(model_11)
##
## studentized Breusch-Pagan test
##
## data: model_11
## BP = 2.2256, df = 5, p-value = 0.8171
### GOOD: p = .817
– independence
# run a durbin-watson test.
dwtest(model_11)
##
## Durbin-Watson test
##
## data: model_11
## DW = 1.9674, p-value = 0.4118
## alternative hypothesis: true autocorrelation is greater than 0
### GOOD: p = .412
– normality
# look at a histogram of the residuals.
hist(residuals(model_11))

### GOOD: looks good to me!
# look at a Q-Q plot of the residuals.
qqnorm(residuals(model_11))
qqline(residuals(model_11))

### BAD: deviations on the lower left and upper right, but not too curved i don't think.
# run a shapiro-wilk test.
shapiro.test(residuals(model_11))
##
## Shapiro-Wilk normality test
##
## data: residuals(model_11)
## W = 0.95726, p-value = 1.364e-05
### BAD: p < .0001
# run an anderson-darling test.
ad.test(residuals(model_11))
##
## Anderson-Darling normality test
##
## data: residuals(model_11)
## A = 1.8503, p-value = 9.641e-05
### BAD: p < .0001
– multicollinearity
# determine variance inflation factor for each IV.
vif(model_11)
## Emotion_Prediction_6 Emotion_Prediction_7 Emotion_Prediction_8
## 1.075773 1.402257 3.016716
## Emotion_Prediction_9 Emotion_Prediction_10
## 1.666548 3.373473
### GOOD: none are above 5!
## PCA
# run a PCA on the 10 PA emotions.
PCA_Data <- data_11[, c("Emotion_Prediction_1", "Emotion_Prediction_2", "Emotion_Prediction_3",
"Emotion_Prediction_4", "Emotion_Prediction_5", "Emotion_Prediction_6",
"Emotion_Prediction_7", "Emotion_Prediction_8", "Emotion_Prediction_9",
"Emotion_Prediction_10")]
PCA_Data <- na.omit(PCA_Data) # remove NAs
PCA_Data_normalized <- scale(PCA_Data) # scale the data
PCA_Data_normalized <- as.data.frame(PCA_Data_normalized) # make into data frame
PCA_Result <- princomp(PCA_Data_normalized)
summary(PCA_Result)
## Importance of components:
## Comp.1 Comp.2 Comp.3 Comp.4 Comp.5
## Standard deviation 2.3906442 1.0330368 0.83823022 0.76893260 0.73675029
## Proportion of Variance 0.5744792 0.1072694 0.07062705 0.05943209 0.05456134
## Cumulative Proportion 0.5744792 0.6817486 0.75237567 0.81180776 0.86636910
## Comp.6 Comp.7 Comp.8 Comp.9 Comp.10
## Standard deviation 0.62814888 0.58698627 0.51935545 0.41616977 0.38388739
## Proportion of Variance 0.03966154 0.03463381 0.02711276 0.01740947 0.01481331
## Cumulative Proportion 0.90603064 0.94066446 0.96777722 0.98518669 1.00000000
### component 1 accounts for 57% of the variance; component 2 accounts for 10% of the variance; component 3 accounts for 7% of the variance.
### together, the first 3 components account for 75% of the variance.
# look at the loadings of each emotion on the first 3 components.
PCA_Result$loadings[, 1:3]
## Comp.1 Comp.2 Comp.3
## Emotion_Prediction_1 0.36034866 0.11568034 0.007662283
## Emotion_Prediction_2 0.34053102 0.13803922 0.289885762
## Emotion_Prediction_3 0.37886767 0.09970581 0.073984548
## Emotion_Prediction_4 0.32563313 0.23218761 0.087649703
## Emotion_Prediction_5 0.29217691 0.17489333 -0.288861405
## Emotion_Prediction_6 0.09033678 -0.87362618 0.106650551
## Emotion_Prediction_7 0.27375530 -0.14668842 0.670978113
## Emotion_Prediction_8 0.36282758 -0.04667002 -0.175230757
## Emotion_Prediction_9 0.27657184 -0.26773396 -0.554493451
## Emotion_Prediction_10 0.35777639 -0.12051331 -0.139841572
### everything but "calm" is loading on component 1 around .3
### "calm" loads negatively on component two at -.87, with nothing else loading as high
### the loadings for component 3 are a little mixed
# look at a scree plot.
fviz_eig(PCA_Result, addlabels = TRUE)

### looks like we should focus on the first two components.
# visualize the PCA results in another way (forget what this is called).
fviz_pca_var(PCA_Result, col.var = "black")

### emotion 6 really deviates from all the other emotions.
# look at the eigenvalues.
get_eigenvalue(PCA_Result)
## eigenvalue variance.percent cumulative.variance.percent
## Dim.1 5.7151795 57.447918 57.44792
## Dim.2 1.0671651 10.726944 68.17486
## Dim.3 0.7026299 7.062705 75.23757
## Dim.4 0.5912573 5.943209 81.18078
## Dim.5 0.5428010 5.456134 86.63691
## Dim.6 0.3945710 3.966154 90.60306
## Dim.7 0.3445529 3.463381 94.06645
## Dim.8 0.2697301 2.711276 96.77772
## Dim.9 0.1731973 1.740947 98.51867
## Dim.10 0.1473695 1.481331 100.00000
### this confirms that we should focus on the first 2 components, since those are the only two with eigenvalues above 1.
# another way to visualize the data.
var <- get_pca_var(PCA_Result)
corrplot(var$cos2, is.corr=FALSE)

### this once again confirms that "calm" sticks out as loading on a different component, whereas all the other emotions load onto the first component pretty strongly.