Calculate the Optimal Behavior for the Actor following an Event

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

Arguments

d

data that has been reshaped by the reshape_events_df function

equation_key

a string corresponding to the equation key from actdata

equation_gender

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

Value

3 digit EPA indicating the optimal behavior

Examples


opt_behavior_example <- tibble::tibble(actor = "teenager", behavior = "beam_at",object = "friend")
opt_behavior_df <- reshape_events_df(df = opt_behavior_example, df_format = "wide", dictionary_key = "indiana2003", dictionary_gender = "male")
#> Joining, by = c("term", "component")
opt_b <- optimal_behavior(d = opt_behavior_df, equation_key = "nc1978", equation_gender = "male")
#> Adding missing grouping variables: `event_id`