This tutorial first explains what long data and wide data are. Further, it provides two perspectives to explain the differences between long data and wide data. Finally, I show how wide versus long data impact the t-test in Excel and R software.
Tutorial Content
0:00 - Data examples for long and wide data
1:05 - Difference between long and wide data (Perspective 1 - Repeated values or not)
2:01 - Difference between long and wide data (Perspective 2 - X-Y or IV - DV framework)
3:31 - Long vs. Wide data in Excel (t-test example)
5:18 - Long vs. Wide data in R (using the function of t.test() as examples)
Slides used in the tutorial:
https://github.com/tidydatayt/long_wide_data/blob/main/long_vs_wide_data_FINAL.pdf
R code used in the tutorial:
https://github.com/tidydatayt/long_wide_data/blob/main/long_wide_data_t_test.R
Disclaimer:
The accuracy and comprehensiveness of this tutorial (& the slides/pdf) are not assured. It is advisable to verify independently or seek advice from professionals. The author of this tutorial (& the slides/pdf) bears no responsibility or liability for its accuracy and completeness.