IEI Scoring - Example R Code

## How to compute Interpersonal Emotion Inventory scale scores (and other indices) ##

library(dplyr)

## Compute raw IEI octant scores ##
# The items associated with the item names below are listed at in this Excel sheet.
YourData <- YourData %>%
 mutate(PA = (IEI_PA1 + IEI_PA2 + IEI_PA3 + IEI_PA4 + IEI_PA5 + IEI_PA6 + IEI_PA7 + IEI_PA8) / 8, # PA = Agentic
        BC = (IEI_BC1 + IEI_BC2 + IEI_BC3 + IEI_BC4 + IEI_BC5 + IEI_BC6 + IEI_BC7 + IEI_BC8) / 8, # BC = Agentic & Uncommunal
        DE = (IEI_DE1 + IEI_DE2 + IEI_DE3 + IEI_DE4 + IEI_DE5 + IEI_DE6 + IEI_DE7 + IEI_DE8) / 8, # DE = Uncommunal
        FG = (IEI_FG1 + IEI_FG2 + IEI_FG3 + IEI_FG4 + IEI_FG5 + IEI_FG6 + IEI_FG7 + IEI_FG8) / 8, # FG = Unagentic & Uncommunal
        HI = (IEI_HI1 + IEI_HI2 + IEI_HI3 + IEI_HI4 + IEI_HI5 + IEI_HI6 + IEI_HI7 + IEI_HI8) / 8, # HI = Unagentic
        JK = (IEI_JK1 + IEI_JK2 + IEI_JK3 + IEI_JK4 + IEI_JK5 + IEI_JK6 + IEI_JK7 + IEI_JK8) / 8, # JK = Unagentic & Communal
        LM = (IEI_LM1 + IEI_LM2 + IEI_LM3 + IEI_LM4 + IEI_LM5 + IEI_LM6 + IEI_LM7 + IEI_LM8) / 8, # LM = Communal
        NO = (IEI_NO1 + IEI_NO2 + IEI_NO3 + IEI_NO4 + IEI_NO5 + IEI_NO6 + IEI_NO7 + IEI_NO8) / 8) # NO = Agentic & Communal

## Compute scores for the overall bipolar X (communal) and Y (agentic) vectors.
YourData <- YourData %>%
 mutate(AGENTIC = 0.25 * (PA - HI + (0.707 * (BC + NO - FG - JK))),
       COMMUNAL = 0.25 * (LM - DE + (0.707 * (NO + JK - FG - BC))))

### The above commands are all you need to do the basic scoring
### The code below offer examples of how to compute additional scores or indices

## Compute "Structural Summary" Parameters ##
YourData <- YourData %>%
 mutate(
  # Compute "vector length" or "amplitude" (AMP)
  AMP = sqrt(AGENTIC^2 + COMMUNAL^2),
  # Compute overall mean or "response elevation" (ELE)
  ELE = (PA + BC + DE + FG + HI + JK + LM + NO)/8,
  # Compute Sum of Squared Deviations (SStot)
  SStot = ((PA - ELE)^2 + (BC - ELE)^2 + (DE - ELE)^2 + (FG - ELE)^2 +
  (HI - ELE)^2 + (JK - ELE)^2 + (LM - ELE)^2 + (NO - ELE)^2),
  # Compute Circumplex Goodness-of-Fit (R-squared)
  R2 = (4 * (AMP^2)) / SStot
 )
# Compute Angular Displacement or Circumplex Angle (ANG)
YourData <- YourData %>%
 mutate(ANG = 
  ifelse(AGENTIC > 0 & COMMUNAL > 0, 000 + atan(AGENTIC/COMMUNAL) * (180 / pi),
  ifelse(AGENTIC > 0 & COMMUNAL < 0, 180 + atan(AGENTIC/COMMUNAL) * (180 / pi),
  ifelse(AGENTIC < 0 & COMMUNAL > 0, 360 + atan(AGENTIC/COMMUNAL) * (180 / pi),
  ifelse(AGENTIC < 0 & COMMUNAL < 0, 180 + atan(AGENTIC/COMMUNAL) * (180 / pi), NA)))))

## Compute z-scores
YourData <- YourData %>%
 mutate(
  # First, insert the means (M) and standard deviations (SD) from a relevant comparison sample
  # For example, below are Ms and SDs from a sample of 1,223 U.S. undergraduates.
  M_PA <- 2.00,
  M_BC <- 1.21,
  M_DE <- 0.91,
  M_FG <- 1.18,
  M_HI <- 2.03,
  M_JK <- 2.63,
  M_LM <- 2.70,
  M_NO <- 2.41,
  SD_PA <- 0.71,
  SD_BC <- 0.61,
  SD_DE <- 0.68,
  SD_FG <- 0.84,
  SD_HI <- 0.86,
  SD_JK <- 0.60,
  SD_LM <- 0.66,
  SD_NO <- 0.73,
  # Then compute z-scores
  zPA = (PA - M_PA) / SD_PA,
  zBC = (BC - M_BC) / SD_BC,
  zDE = (DE - M_DE) / SD_DE,
  zFG = (FG - M_FG) / SD_FG,
  zHI = (HI - M_HI) / SD_HI,
  zJK = (JK - M_JK) / SD_JK,
  zLM = (LM - M_LM) / SD_LM,
  zNO = (NO - M_NO) / SD_NO,
)

# Compute ipsative octant scale scores
YourData <- YourData %>%
 mutate(
  iPA = PA - ELE,
  iBC = BC - ELE,
  iDE = DE - ELE,
  iFG = FG - ELE,
  iHI = HI - ELE,
  iJK = JK - ELE,
  iLM = LM - ELE,
  iNO = NO - ELE
 )