Skip to contents

Voilá! We’ve arrived at the final step, and all that’s left is to calculate summary statistics! We can decide whether which measures of central tendency and dispersion (e.g. mean and SD). As most movement data is highly skewed, we recommend to use median and MAD (default setting).

library(tinytable)
df_kinematics_clean |>
  calculate_statistics(measures = "median_mad") |>
  select(-uid) |>
  mutate(across(everything(), as.numeric)) |>
  tidyr::pivot_longer(everything(),
    names_to = "Measure",
    values_to = "Value"
  ) |>
  tt() |>
  format_tt(digits = 2)
Measure Value
median_direction 1.4441032342060967
mad_direction 0.2368487609469971
median_v_translation 1.1893781232345191
median_a_translation 7.2372389037648981
median_v_rotation 4.5526462275238302
median_a_rotation 447.6779803675393055
mad_v_translation 0.7304126001892335
mad_a_translation 10.7299303986401622
mad_v_rotation -0.0000000000000087
mad_a_rotation -0.0000000000010257
total_distance 119.5512360621872858
total_rotation 760.4137339347830675
straightness_A 1.3814346341566919
straightness_B 0.7238851374321147
straightness_C 0.1572186702146553
straightness_D 6.3605677279592205