Objective

Wikipedia describes exploratory data analysis (EDA) as analysing datasets to summarise main characteristics, often using statistical graphics and other data visualisation methods. According to Wickham and Grolemund in their publication R for Data Science, two questions help make discoveries within data. These questions are: what type of variation occurs within variables and what type of covariation occurs between variables?

This vignette explores numeric variables. The dataset comprised 616 respondents from 10 public and private sector organisations experiencing organisational change. Emotion towards organisational change was operationalised into five mood states. After exploring these five mood states, the extent of covariation between emotion and another numeric variable, reaction to organisational change, will be explored.

Workflow

The raw dataset was tidied prior to exploration. This included recoding reverse-scored items, renaming variables where appropriate, updating data types and checking for anomalies. Cases with an unworkable amount of missing values, of which there were very few, were removed. Apart from routine reshaping of data, no other wrangling was required.

The exploratory data analysis consisted of a statistical summary and visualisation of emotion and five mood states. A similar exploratory analysis was performed on the numeric variable reaction to organisational change. To conclude, explored the covariation between the five mood states of emotion and reaction to organisational change.

Results

1. Explore emotion and mood states

1.1 Summary statistics

Table 1 presents a statistical summary of the summated variable emotion operationalised by five mood states.

Table 1 Emotion and mood state statistical summary
vars n mean sd median trimmed mad min max range skew kurtosis se
emotion 1 616 4.11 1.04 4.07 4.11 0.93 1 7 6 0.06 -0.02 0.04
depressed_elated 2 616 4.09 1.10 4.00 4.10 1.11 1 7 6 -0.09 0.25 0.04
anxious_relaxed 3 616 4.14 1.26 4.00 4.15 1.48 1 7 6 -0.03 -0.40 0.05
unsure_confident 4 616 4.37 1.06 4.25 4.38 1.11 1 7 6 -0.09 0.03 0.04
fatigued_energetic 5 616 3.63 1.32 3.75 3.62 1.48 1 7 6 0.07 -0.42 0.05
grouchy_goodnatured 6 616 4.35 1.13 4.25 4.36 1.11 1 7 6 -0.17 -0.05 0.05

1.2 Explore emotion

Visualised emotion with a combined density histogram and a combined violin box plot in Charts 1 and 2.

1.3 Explore mood states

Mood states are visualised with density histograms, overlapping density plots, notched box plots and violin box plots.

2. Explore reaction to change

2.1 Summary statistics

Table 2 is a statistical summary of the numeric variable reaction towards organisational change.

Table 2 Reaction towards change statistical summary
vars n mean sd median trimmed mad min max range skew kurtosis se
reaction 1 616 4.55 1.66 5 4.64 1.48 1 7 6 -0.46 -0.91 0.07

2.2 Explore reaction to change

Charts 7 and 8 show reaction towards organisational change with a combined density histogram and a combined violin box plot.

3. Explore covariation

Charts 9 and 10 are correlation matrices. The results show that all variables are positively correlated with high significance. As expected, emotion is highly correlated with mood states, with coefficients ranging from 0.84 to 0.93. The five mood states have correlation coefficients ranging from 0.64 to 0.85. Finally, the summated variable emotion positively correlates with reaction towards change with a correlation coefficient of 0.62.

The scatter plots in Charts 11 and 12 illustrate the relationship between emotion and reaction towards organisational change. The scatter plots show that the higher the level of negative emotion, the higher the opposition towards organisational change. The scatter plots also show that as positive emotion towards organisational change increased, the level of support for change also increased.

In conclusion, this vignette explored numerical variables, specifically a summated variable named emotion, operationalised by five mood states, and a stand-alone numeric variable reaction towards organisational change. To test the significance of the relationship between these two variables, look at the vignette on hypothesis testing numerical variables. To see more examples of the relationship between emotion and reaction towards change, review the vignettes on supervised and unsupervised cluster analysis.


Reference:

Emotion was measured using ‘A semantic differential mood scale’ by Lorr and Wunderlich, published in the Journal of Clinical Psychology.


Session information and package update

## ─ Session info ───────────────────────────────────────────────────────────────
##  setting  value
##  version  R version 4.4.0 (2024-04-24 ucrt)
##  os       Windows 11 x64 (build 22631)
##  system   x86_64, mingw32
##  ui       RTerm
##  language (EN)
##  collate  English_Australia.utf8
##  ctype    English_Australia.utf8
##  tz       Australia/Brisbane
##  date     2024-07-29
##  pandoc   3.1.11 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)
## 
## ─ Packages ───────────────────────────────────────────────────────────────────
##  package      * version  date (UTC) lib source
##  backports      1.5.0    2024-05-23 [1] CRAN (R 4.4.0)
##  base64enc      0.1-3    2015-07-28 [1] CRAN (R 4.4.0)
##  bslib          0.7.0    2024-03-29 [1] CRAN (R 4.4.0)
##  cachem         1.1.0    2024-05-16 [1] CRAN (R 4.4.0)
##  checkmate      2.3.1    2023-12-04 [1] CRAN (R 4.4.0)
##  cli            3.6.3    2024-06-21 [1] CRAN (R 4.4.1)
##  cluster        2.1.6    2023-12-01 [2] CRAN (R 4.4.0)
##  colorspace     2.1-0    2023-01-23 [1] CRAN (R 4.4.1)
##  data.table   * 1.15.4   2024-03-30 [1] CRAN (R 4.4.0)
##  devtools       2.4.5    2022-10-11 [1] CRAN (R 4.4.0)
##  digest         0.6.36   2024-06-23 [1] CRAN (R 4.4.1)
##  dplyr        * 1.1.4    2023-11-17 [1] CRAN (R 4.4.0)
##  ellipsis       0.3.2    2021-04-29 [1] CRAN (R 4.4.0)
##  evaluate       0.24.0   2024-06-10 [1] CRAN (R 4.4.0)
##  fansi          1.0.6    2023-12-08 [1] CRAN (R 4.4.0)
##  farver         2.1.2    2024-05-13 [1] CRAN (R 4.4.0)
##  fastmap        1.2.0    2024-05-15 [1] CRAN (R 4.4.0)
##  forcats      * 1.0.0    2023-01-29 [1] CRAN (R 4.4.0)
##  foreign        0.8-86   2023-11-28 [2] CRAN (R 4.4.0)
##  Formula        1.2-5    2023-02-24 [1] CRAN (R 4.4.0)
##  fs             1.6.4    2024-04-25 [1] CRAN (R 4.4.0)
##  generics       0.1.3    2022-07-05 [1] CRAN (R 4.4.0)
##  GGally       * 2.2.1    2024-02-14 [1] CRAN (R 4.4.0)
##  ggplot2      * 3.5.1    2024-04-23 [1] CRAN (R 4.4.0)
##  ggstats        0.6.0    2024-04-05 [1] CRAN (R 4.4.0)
##  glue           1.7.0    2024-01-09 [1] CRAN (R 4.4.0)
##  gridExtra      2.3      2017-09-09 [1] CRAN (R 4.4.0)
##  gtable         0.3.5    2024-04-22 [1] CRAN (R 4.4.0)
##  here         * 1.0.1    2020-12-13 [1] CRAN (R 4.4.0)
##  highr          0.11     2024-05-26 [1] CRAN (R 4.4.0)
##  Hmisc        * 5.1-3    2024-05-28 [1] CRAN (R 4.4.0)
##  hms            1.1.3    2023-03-21 [1] CRAN (R 4.4.0)
##  htmlTable      2.4.3    2024-07-21 [1] CRAN (R 4.4.1)
##  htmltools      0.5.8.1  2024-04-04 [1] CRAN (R 4.4.0)
##  htmlwidgets    1.6.4    2023-12-06 [1] CRAN (R 4.4.0)
##  httpuv         1.6.15   2024-03-26 [1] CRAN (R 4.4.0)
##  isoband        0.2.7    2022-12-20 [1] CRAN (R 4.4.0)
##  jquerylib      0.1.4    2021-04-26 [1] CRAN (R 4.4.0)
##  jsonlite       1.8.8    2023-12-04 [1] CRAN (R 4.4.0)
##  kableExtra   * 1.4.0    2024-01-24 [1] CRAN (R 4.4.0)
##  knitr          1.48     2024-07-07 [1] CRAN (R 4.4.1)
##  labeling       0.4.3    2023-08-29 [1] CRAN (R 4.4.0)
##  later          1.3.2    2023-12-06 [1] CRAN (R 4.4.0)
##  lattice        0.22-6   2024-03-20 [2] CRAN (R 4.4.0)
##  lifecycle      1.0.4    2023-11-07 [1] CRAN (R 4.4.0)
##  lubridate    * 1.9.3    2023-09-27 [1] CRAN (R 4.4.0)
##  magrittr       2.0.3    2022-03-30 [1] CRAN (R 4.4.0)
##  MASS           7.3-60.2 2024-04-24 [2] local
##  Matrix         1.7-0    2024-03-22 [2] CRAN (R 4.4.0)
##  memoise        2.0.1    2021-11-26 [1] CRAN (R 4.4.0)
##  mgcv           1.9-1    2023-12-21 [2] CRAN (R 4.4.0)
##  mime           0.12     2021-09-28 [1] CRAN (R 4.4.0)
##  miniUI         0.1.1.1  2018-05-18 [1] CRAN (R 4.4.0)
##  mnormt         2.1.1    2022-09-26 [1] CRAN (R 4.4.0)
##  munsell        0.5.1    2024-04-01 [1] CRAN (R 4.4.0)
##  nlme           3.1-164  2023-11-27 [2] CRAN (R 4.4.0)
##  nnet           7.3-19   2023-05-03 [2] CRAN (R 4.4.0)
##  pillar         1.9.0    2023-03-22 [1] CRAN (R 4.4.0)
##  pkgbuild       1.4.4    2024-03-17 [1] CRAN (R 4.4.0)
##  pkgconfig      2.0.3    2019-09-22 [1] CRAN (R 4.4.0)
##  pkgload        1.4.0    2024-06-28 [1] CRAN (R 4.4.1)
##  plyr           1.8.9    2023-10-02 [1] CRAN (R 4.4.0)
##  profvis        0.3.8    2023-05-02 [1] CRAN (R 4.4.0)
##  promises       1.3.0    2024-04-05 [1] CRAN (R 4.4.0)
##  psych        * 2.4.6.26 2024-06-27 [1] CRAN (R 4.4.1)
##  purrr        * 1.0.2    2023-08-10 [1] CRAN (R 4.4.0)
##  R6             2.5.1    2021-08-19 [1] CRAN (R 4.4.0)
##  RColorBrewer   1.1-3    2022-04-03 [1] CRAN (R 4.4.0)
##  Rcpp           1.0.13   2024-07-17 [1] CRAN (R 4.4.1)
##  readr        * 2.1.5    2024-01-10 [1] CRAN (R 4.4.0)
##  remotes        2.5.0    2024-03-17 [1] CRAN (R 4.4.0)
##  rlang          1.1.4    2024-06-04 [1] CRAN (R 4.4.0)
##  rmarkdown      2.27     2024-05-17 [1] CRAN (R 4.4.0)
##  rpart          4.1.23   2023-12-05 [2] CRAN (R 4.4.0)
##  rprojroot      2.0.4    2023-11-05 [1] CRAN (R 4.4.0)
##  rstudioapi     0.16.0   2024-03-24 [1] CRAN (R 4.4.0)
##  sass           0.4.9    2024-03-15 [1] CRAN (R 4.4.0)
##  scales         1.3.0    2023-11-28 [1] CRAN (R 4.4.0)
##  sessioninfo    1.2.2    2021-12-06 [1] CRAN (R 4.4.0)
##  shiny          1.8.1.1  2024-04-02 [1] CRAN (R 4.4.0)
##  stringi        1.8.4    2024-05-06 [1] CRAN (R 4.4.0)
##  stringr      * 1.5.1    2023-11-14 [1] CRAN (R 4.4.0)
##  svglite        2.1.3    2023-12-08 [1] CRAN (R 4.4.0)
##  systemfonts    1.1.0    2024-05-15 [1] CRAN (R 4.4.0)
##  tibble       * 3.2.1    2023-03-20 [1] CRAN (R 4.4.0)
##  tidyr        * 1.3.1    2024-01-24 [1] CRAN (R 4.4.0)
##  tidyselect     1.2.1    2024-03-11 [1] CRAN (R 4.4.0)
##  tidyverse    * 2.0.0    2023-02-22 [1] CRAN (R 4.4.0)
##  timechange     0.3.0    2024-01-18 [1] CRAN (R 4.4.0)
##  tzdb           0.4.0    2023-05-12 [1] CRAN (R 4.4.0)
##  urlchecker     1.0.1    2021-11-30 [1] CRAN (R 4.4.0)
##  usethis        2.2.3    2024-02-19 [1] CRAN (R 4.4.0)
##  utf8           1.2.4    2023-10-22 [1] CRAN (R 4.4.0)
##  vctrs          0.6.5    2023-12-01 [1] CRAN (R 4.4.0)
##  viridisLite    0.4.2    2023-05-02 [1] CRAN (R 4.4.0)
##  withr          3.0.0    2024-01-16 [1] CRAN (R 4.4.0)
##  xfun           0.46     2024-07-18 [1] CRAN (R 4.4.1)
##  xml2           1.3.6    2023-12-04 [1] CRAN (R 4.4.0)
##  xtable         1.8-4    2019-04-21 [1] CRAN (R 4.4.0)
##  yaml           2.3.9    2024-07-05 [1] CRAN (R 4.4.1)
## 
##  [1] C:/Users/wayne/AppData/Local/R/win-library/4.4
##  [2] C:/Program Files/R/R-4.4.0/library
## 
## ──────────────────────────────────────────────────────────────────────────────