Source: Psi Chi R Contest

Load packages and import data

#library(tidyverse)

library(dplyr)
library(purrr)

dataset=read.csv('psichiR_Apr2024.csv')

Check for NAs and NULLs

#skim=skimr::skim(dataset)

sum(is.na(dataset))
## [1] 21742
sum(is.null(dataset))
## [1] 0

Level 1

  • Let’s get familiar with our data. Create a table that shows how many times each state is represented in the dataset (variable name: Statecurrent)
  • One of our research questions is which subscales of the FACES are related to horizontal individualism? So let’s create the subscales we need to run the analyses

o Create by COShindivid (Horizontal Individualism) doing COS1 + COS5 + COS9 + COS13

o Create disengaged (FACEdisen) by FACES3 + FACES9 + FACES15 + FACES21 + FACES27 + FACES33 + FACES39

o Create enmeshed (FACEenmesh) by FACES4 + FACES10 + FACES16 + FACES22 + FACES28 + FACES34 + FACES40

o Create Rigid (FACErigid) by FACES5 + FACES11 + FACES17 + FACES23 + FACES29 + FACES35 + FACES41

o Create Chaotic (FACEchaotic) by FACES6 + FACES12 + FACES18 + FACES24 + FACES30 + FACES36 + FACES42

o Create Communication (FACEcomm) by FACES43 + FACES44 + FACES45 + FACES46 + FACES47 + FACES48 + FACES49 + FACES50 + FACES51 + FACES52

o Create Satisfaction (FACEsatis) by FACES53 + FACES54 + FACES55 + FACES56 + FACES57 + FACES58 + FACES59 + FACES60 + FACES61 + FACES62

dataset1=dataset %>% 
  mutate(COShindivid=COS1 + COS5 + COS9 + COS13,
         FACEdisen= FACES3 + FACES9 + FACES15 + FACES21 + FACES27 + FACES33 + FACES39,
         FACEenmesh= FACES4 + FACES10 + FACES16 + FACES22 + FACES28 + FACES34 + FACES40,
         FACErigid= FACES5 + FACES11 + FACES17 + FACES23 + FACES29 + FACES35 + FACES41,
         FACEchaotic= FACES6 + FACES12 + FACES18 + FACES24 + FACES30 + FACES36 + FACES42,
         FACEcomm= FACES43 + FACES44 + FACES45 + FACES46 + FACES47 + FACES48 + FACES49 + FACES50 + FACES51 + FACES52,
         FACEsatis= FACES53 + FACES54 + FACES55 + FACES56 + FACES57 + FACES58 + FACES59 + FACES60 + FACES61 + FACES62) %>% 
  select(COS1,COShindivid,FACEdisen,FACEenmesh,FACErigid,FACEchaotic,FACEcomm,FACEsatis,everything())

Level 2

  • Provide the mean, standard deviation, median, and range of values for ’FACEenmesh
  • Provide the mean, standard deviation, median, and range of values for ‘COShindivid’
  • Produce a visual that will show if the ‘FACEsatis’ variable contains any outliers.
library(purrr)

purr_list=data.frame(FACEenmesh=dataset1$FACEenmesh,COShindivid=dataset1$COShindivid)

desc_stat=function(x) {
  list(mean=mean(x,na.rm=T),sd=sd(x,na.rm=T),
       median=median(x,na.rm=T),range=range(x,na.rm=T))
}

stats=purr_list %>% 
  map(desc_stat) %>% 
  as.data.frame()

print(stats) #the mean, standard deviation, median, and range for FACEenmesh and COShindivid
##   FACEenmesh.mean FACEenmesh.sd FACEenmesh.median FACEenmesh.range
## 1        15.22561      4.867272                14                7
## 2        15.22561      4.867272                14               35
##   COShindivid.mean COShindivid.sd COShindivid.median COShindivid.range
## 1         27.21285       5.336077                 28                 9
## 2         27.21285       5.336077                 28                36
summary(dataset1$FACEsatis)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   10.00   30.00   38.00   36.83   42.00   50.00      21
FACE=na.omit(dataset1$FACEsatis) %>% 
  data.frame() %>% 
  rename(face=1)

summary(FACE)
##       face      
##  Min.   :10.00  
##  1st Qu.:30.00  
##  Median :38.00  
##  Mean   :36.83  
##  3rd Qu.:42.00  
##  Max.   :50.00
boxplot(FACE$face,main='Party Crashers or Trendsetters? A Tale of Two Data Points',xlab='FACEsatis',ylab='Count',lwd=1.5,boxfill='darkgreen',pch=1.5,outcol='red')

ggplot2 version of the above

#library(ggplot2)

dataset1 %>%
  ggplot(aes(y=FACEsatis))+
  theme_bw()+
  geom_boxplot(fill='darkgreen',outlier.color = 'red',lwd=1.5,outlier.size = 2)+
  labs(title = 'Party Crashers or Trendsetters? A Tale of Two Data Points',x='FACEsatis',y='Count')+
  theme(plot.title = element_text(hjust = .5))

Level 3

  • Does the ‘COShindivid’ variable meet the assumption of normality? Show both a visual and key statistics.
summary(dataset1$COShindivid)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    9.00   23.00   28.00   27.21   31.00   36.00      11
COSH=na.omit(dataset1$COShindivid) %>%
  data.frame()

summary(COSH)
##        .        
##  Min.   : 9.00  
##  1st Qu.:23.00  
##  Median :28.00  
##  Mean   :27.21  
##  3rd Qu.:31.00  
##  Max.   :36.00
hist(COSH$.,freq=F,main = 'Long Tail, Big Dreams: A Look at Our Left-Skewed Distribution',ylab = 'Density',xlab='COShindivid',col='darkgreen')
lines(density(COSH$.),lwd=2,col='red')

shapiro.test(COSH$.) #No, COShindivid violates normality
## 
##  Shapiro-Wilk normality test
## 
## data:  COSH$.
## W = 0.97248, p-value = 0.00000004639

ggplot2 version of the above

#library(ggplot)

dataset1 %>%
  ggplot(aes(x=COShindivid))+
  theme_bw()+
  geom_histogram(aes(y=..density..),col='black',fill='darkgreen',show.legend = F,bins=15)+
  geom_density(col='red',lwd=2)+
  labs(title = 'Long Tail, Big Dreams: A Look at Our Left-Skewed Distribution')+
  theme(plot.title = element_text(hjust = .5))

Level 4

  • Create a correlation matrix to show the relationship between COShindivid, FACEdisen, FACEenmesh, FACErigid, FACEchaotic, FACEcomm, FACEsatis
cor_data=dataset1[,c(2:8)]

cor_matrix=cor_data %>% 
  na.omit() %>% 
  cor() %>% 
  round(digits = 2) %>% 
  as.data.frame()

print(cor_matrix)
##             COShindivid FACEdisen FACEenmesh FACErigid FACEchaotic FACEcomm
## COShindivid        1.00      0.10      -0.05      0.01       -0.02    -0.01
## FACEdisen          0.10      1.00       0.54      0.06        0.71    -0.47
## FACEenmesh        -0.05      0.54       1.00      0.31        0.55    -0.18
## FACErigid          0.01      0.06       0.31      1.00       -0.03     0.23
## FACEchaotic       -0.02      0.71       0.55     -0.03        1.00    -0.44
## FACEcomm          -0.01     -0.47      -0.18      0.23       -0.44     1.00
## FACEsatis          0.06     -0.44      -0.13      0.18       -0.41     0.78
##             FACEsatis
## COShindivid      0.06
## FACEdisen       -0.44
## FACEenmesh      -0.13
## FACErigid        0.18
## FACEchaotic     -0.41
## FACEcomm         0.78
## FACEsatis        1.00

Heatmap for correlation matrix

use_color=colorRampPalette(c('lightblue','darkblue'))

cor_matrix %>% 
  as.matrix() %>% 
  heatmap(margins = c(10,5),col=use_color(100),main = 'A Heatmap Exposé on Satisfaction and Communication')

sessionInfo()
## R version 4.3.2 (2023-10-31 ucrt)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 19045)
## 
## Matrix products: default
## 
## 
## locale:
## [1] LC_COLLATE=English_United States.utf8 
## [2] LC_CTYPE=English_United States.utf8   
## [3] LC_MONETARY=English_United States.utf8
## [4] LC_NUMERIC=C                          
## [5] LC_TIME=English_United States.utf8    
## 
## time zone: America/New_York
## tzcode source: internal
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] purrr_1.0.2      dplyr_1.1.4      conflicted_1.2.0 lubridate_1.9.3 
## [5] janitor_2.2.0    ggplot2_3.5.0   
## 
## loaded via a namespace (and not attached):
##  [1] jsonlite_1.8.7    gtable_0.3.4      highr_0.10        compiler_4.3.2   
##  [5] tidyselect_1.2.0  stringr_1.5.0     snakecase_0.11.1  jquerylib_0.1.4  
##  [9] scales_1.3.0      yaml_2.3.7        fastmap_1.1.1     R6_2.5.1         
## [13] labeling_0.4.3    generics_0.1.3    knitr_1.45        tibble_3.2.1     
## [17] munsell_0.5.0     bslib_0.5.1       pillar_1.9.0      rlang_1.1.1      
## [21] utf8_1.2.3        cachem_1.0.8      stringi_1.7.12    xfun_0.40        
## [25] sass_0.4.7        timechange_0.2.0  memoise_2.0.1     cli_3.6.1        
## [29] withr_2.5.1       magrittr_2.0.3    digest_0.6.33     grid_4.3.2       
## [33] rstudioapi_0.15.0 lifecycle_1.0.3   vctrs_0.6.5       evaluate_0.22    
## [37] glue_1.6.2        farver_2.1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