This function calculates the deflection for ABO events contained in a dataframe corresponding to the inteRact event data structure.

get_deflection(
  d,
  equation_key = NULL,
  equation_gender = NULL,
  eq_df = NULL,
  ...
)

Arguments

d

inteRact-style events dataframe

equation_key

a string corresponding to the equation key from actdata

eq_df

if you use your own equation, this parameter should be your equation dataframe, which (should have been reshaped by the reshape_new_equation function prior)

dictionary_key

a string corresponding to the dictionary from actdata you are using for cultural EPA measurements

gender

either average, male, or female, depending on if you are using gendered equations

Value

calculated deflection for the event (single number)

Examples

d <- tibble::tibble(actor = "ceo", behavior = "advise", object = "benefactor")
d <- reshape_events_df(df = d, df_format = "wide", dictionary_key = "usfullsurveyor2015", dictionary_gender = "average")
#> Joining, by = c("term", "component")
get_deflection(d = d, equation_key = "us2010", equation_gender= "average")
#> Adding missing grouping variables: `event_id`
#> [1] 6.954108