reading time: 10 min. A quite common task in data analysis is to change a dataset from wide to long format. For example, this is a dataset in wide format: Is is called wide, as, well, it is wide – several columns side by side. For example, assume, we have measured a number of predictors (here: predictor_1, predictor_2, predictor_3), and an outcome measure (here: outcome). In this case, each variable is dichotomous (either yes or …