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 |>
  filter(v_translation > 0) |> 
  calculate_statistics(measures = "median_mad") |> 
  mutate(across(where(is.numeric), as.numeric)) |>
  tidyr::pivot_longer(where(is.numeric),
    names_to = "Measure",
    values_to = "Value"
  ) |> 
  select(-c("individual", "keypoint")) |> 
  tt() |>
  format_tt(digits = 2)
Measure Value
median_direction 1.4535200796680912
mad_direction 0.1453100106355658
median_v_translation 1.0981374443040202
median_a_translation 6.1678023197850944
median_v_rotation 0.2776610540507709
median_a_rotation 219.8288158100958469
mad_v_translation 0.7249919759404327
mad_a_translation 9.1443837192671804
mad_v_rotation -0.0000000000000087
mad_a_rotation -0.0000000000010257
total_d_translation 186.7495678864047761
total_d_rotation 903.5605744982774468
straightness_A 0.9069683124260013
straightness_B 1.1025743527082585
straightness_C 0.2066818464164417
straightness_D 4.8383542983504597