mt_calculate_measures(data, use = "trajectories", save_as = "measures",
flip_threshold = 0, show_progress = TRUE)mt_calculate_measures. Besides, the meaning of these
measures depends on the values of the arguments in
mt_calculate_derivatives.
The following measures are computed for each trajectory:MAD) is the maximum
perpendicular deviation from the straight path connecting start and end point
of the trajectory (e.g., Freeman & Ambady, 2010). If the MAD occurs
above the direct path, this is denoted by a positive value. If it occurs
below the direct path, this is denoted by a negative value. This assumes that
the complete movement in the trial was from bottom to top (i.e., the end
point has a higher y-position than the start point). In case the movement was
from top to bottom, mt_calculate_measures automatically flips the
signs. Both MD_above and MD_below are also reported
separately. The average deviation (AD) is the average of all
deviations across the trial.
The AUC represents the area under curve, i.e., the geometric
area between the actual trajectory and the direct path. Areas above the
direct path are added and areas below are subtracted. The AUC is
calculated using the polyarea function from the pracma
package.mt_example <- mt_calculate_derivatives(mt_example)
mt_example <- mt_calculate_measures(mt_example)
# Merge measures with trial data (adding "_raw"
# to columns already existing in the trial data)
mt_example_results <- merge(
mt_example$data, mt_example$measures,
by="mt_id",suffixes=c("_raw",""))Run the code above in your browser using DataLab