Skip to contents

This function calculates an extended measure of timing similarity for multiple dyads.

Usage

timing_sim_dyads(conversations)

Arguments

conversations

A data frame with columns 'dyad_id', 'speaker', and 'processed_text'

Value

A list containing timing similarity for each dyad and the overall average similarity

Examples

convs <- data.frame(
  dyad_id = c(1, 1, 1, 1, 2, 2, 2, 2),
  speaker = c("A", "B", "A", "B", "C", "D", "C", "D"),
  processed_text = c("i love pizza", "me too favorite food",
                     "whats your favorite topping", "enjoy pepperoni mushrooms",
                     "i prefer pasta", "pasta delicious like spaghetti carbonara",
                     "ever tried making home", "yes quite easy make")
)
timing_sim_dyads(convs)
#> Warning: Only one observation per dyad. Using simple mean for overall average instead of multilevel modeling.
#> $similarities_by_dyad
#> $similarities_by_dyad$`1`
#> [1] 0.3549114
#> 
#> $similarities_by_dyad$`2`
#> [1] 0.04770762
#> 
#> 
#> $overall_average
#> [1] 0.2013095
#>