element_deflection: Compute Element Deflection for an Event

View source: R/element_deflection.R

element_deflectionR Documentation

Compute Element Deflection for an Event

Description

This function calculates the element-wise/decomposed deflection for an Actor, Behavior, Object event.

Usage

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

Arguments

d

data that has been reshaped by the events_df

equation_key

is a string that corresponds to an equation key from actdata from actdata

equation_gender

is a string that corresponds to the gender for the equation

eq_df

is an optional parameter if you are using your own equation dataframe

Value

dataframe in long format, with one row for each element-dimension of the event, columns for fundamental sentiment and transient impression, the difference between the fundamental sentiment and the transient impression (difference) and the squared difference, the element's contribution to deflection.

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")
element_deflection(d = d, equation_key = "us2010", equation_gender = "average")

ekmaloney/inteRact documentation built on Feb. 20, 2023, 1:29 p.m.