Skip to content

Using Circumplex Instruments

%load_ext rich
import numpy as np
from great_tables import GT

from circumplex import (
    get_instrument,
    ipsatize,
    norm_standardize,
    score,
    show_instruments,
)
The rich extension is already loaded. To reload it, use:
  %reload_ext rich

2. Loading and Examining Instrument Objects

Previewing the available instruments

show_instruments()
          The circumplex package currently includes 3 instruments          
┏━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃    Abbreviation  Name                                                 ┃
┡━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 1 │ CSIG          Circumplex Scales of Interpersonal Goals             │
│ 2 │ IIPSC         Inventory of Interpersonal Problems Short Circumplex │
│ 3 │ IPIPIPC       IPIP Interpersonal Circumplex                        │
└───┴──────────────┴──────────────────────────────────────────────────────┘

Loading a specific instrument

csig = get_instrument("csig")
csig


Instrument(
    'CSIG: Circumplex Scales of Interpersonal Goals',
    '32 items, 8 scales, 1 normative data sets',
    'Lock (2014)',
    '< https://doi.org/10.1177/0146167213514280 >'
)
csig.info()
CSIG: Circumplex Scales of Interpersonal Goals
32 items, 8 scales, 1 normative data sets
Lock (2014)
< https://doi.org/10.1177/0146167213514280 >


The CSIG contains 8 scales:
├── PA (90°): Be authoritative
├── BC (135°): Be tough
├── DE (180°): Be self-protective
├── FG (225°): Be wary
├── HI (270°): Be conflict-avoidant
├── JK (315°): Be cooperative
├── LM (360°): Be understanding
└── NO (45°): Be respected


The CSIG is rated using the following 5-point scale:
  0. It is not at all important that...
  1. It is somewhat important that...
  2. It is moderately important that...
  3. It is very important that...
  4. It is extremely important that...



The CSIG currently has 1 normative data set(s):

1. 665 MTurkers from US, Canada, and India about interactions between nations
   Lock (2014)
   https://doi.org/10.1177/0146167213514280

iipsc = get_instrument("iipsc")
iipsc.info()
IIP-SC: Inventory of Interpersonal Problems Short Circumplex
32 items, 8 scales, 2 normative data sets
Soldz, Budman, Demby, & Merry (1995)
< https://doi.org/10.1177/1073191195002001006 >


The IIP-SC contains 8 scales:
├── PA (90°): Domineering
├── BC (135°): Vindictive
├── DE (180°): Cold
├── FG (225°): Socially avoidant
├── HI (270°): Nonassertive
├── JK (315°): Exploitable
├── LM (360°): Overly nurturant
└── NO (45°): Intrusive


The IIP-SC is rated using the following 5-point scale:
  0. Not at all
  1. Somewhat
  2. Moderately
  3. Very
  4. Extremely



The IIP-SC currently has 2 normative data set(s):

1. 872 American college students
   Hopwood, Pincus, DeMoor, & Koonce (2011)
   https://doi.org/10.1080/00223890802388665
2. 106 American psychiatric outpatients
   Soldz, Budman, Demby, & Merry (1995)
   https://doi.org/10.1177/1073191195002001006

import pandas as pd

raw_iipsc = pd.read_csv(
    "/Users/mitch/Documents/GitHub/python-circumplex/src/circumplex/data/raw_iipsc.csv"
)
GT(raw_iipsc.head())

IIP01 IIP02 IIP03 IIP04 IIP05 IIP06 IIP07 IIP08 IIP09 IIP10 IIP11 IIP12 IIP13 IIP14 IIP15 IIP16 IIP17 IIP18 IIP19 IIP20 IIP21 IIP22 IIP23 IIP24 IIP25 IIP26 IIP27 IIP28 IIP29 IIP30 IIP31 IIP32
0 0 0 0.0 1 0 1 0 2 1 0 0 0 1.0 4 3 2 4 2 0 1 0 0 0 3 3 3 0 0 0 1 0
1 1 0 0.0 3 2 2 1 0 1 0 1 4 3.0 3 1 0 0 1 0 1 2 0 0 0 0 0 1 0 0 0 2
1 0 1 0.0 1 1 1 3 0 1 0 0 2 3.0 3 2 2 1 1 0 3 2 3 1 1 1 1 0 3 2 3 2
3 2 3 2 3 2 3 2 3 2 4 2 1.0 2 3 1 2 2 1 3 2 3 2 1 2 3 2 3 2 3 2
0 0 0 1.0 0 0 1 1 0 1 0 2 1 1.0 3 1 0 1 0 1 1 0 1 1 2 1 0 0 0 0 0 0

Ipsatizing item-level data

ips_iipsc = ipsatize(
    data=raw_iipsc,
    items=np.arange(0, 32),
    append=False,
)
GT(ips_iipsc.round(2))

0_i 1_i 2_i 3_i 4_i 5_i 6_i 7_i 8_i 9_i 10_i 11_i 12_i 13_i 14_i 15_i 16_i 17_i 18_i 19_i 20_i 21_i 22_i 23_i 24_i 25_i 26_i 27_i 28_i 29_i 30_i 31_i
-1.0 -1.0 -1.0 -1.0 0.0 -1.0 0.0 -1.0 1.0 0.0 -1.0 -1.0 -1.0 0.0 3.0 2.0 1.0 3.0 1.0 -1.0 0.0 -1.0 -1.0 -1.0 2.0 2.0 2.0 -1.0 -1.0 -1.0 0.0 -1.0
0.06 0.06 -0.94 -0.94 2.06 1.06 1.06 0.06 -0.94 0.06 -0.94 0.06 3.06 2.06 2.06 0.06 -0.94 -0.94 0.06 -0.94 0.06 1.06 -0.94 -0.94 -0.94 -0.94 -0.94 0.06 -0.94 -0.94 -0.94 1.06
-0.41 -1.41 -0.41 -1.41 -0.41 -0.41 -0.41 1.59 -1.41 -0.41 -1.41 -1.41 0.59 1.59 1.59 0.59 0.59 -0.41 -0.41 -1.41 1.59 0.59 1.59 -0.41 -0.41 -0.41 -0.41 -1.41 1.59 0.59 1.59 0.59
0.71 -0.29 0.71 -0.29 0.71 -0.29 0.71 -0.29 0.71 -0.29 1.71 -0.29 -1.29 -0.29 0.71 -1.29 -0.29 -0.29 -1.29 0.71 -0.29 0.71 -0.29 -1.29 -0.29 0.71 -0.29 0.71 -0.29 0.71 -0.29
-0.62 -0.62 -0.62 0.38 -0.62 -0.62 0.38 0.38 -0.62 0.38 -0.62 1.38 0.38 0.38 2.38 0.38 -0.62 0.38 -0.62 0.38 0.38 -0.62 0.38 0.38 1.38 0.38 -0.62 -0.62 -0.62 -0.62 -0.62 -0.62
-0.28 -0.28 -0.28 -0.28 -0.28 -0.28 0.72 0.72 -0.28 -0.28 -0.28 -0.28 -0.28 -0.28 1.72 0.72 0.72 -0.28 -0.28 -0.28 -0.28 -0.28 0.72 0.72 -0.28 -0.28 -0.28 -0.28 -0.28 -0.28 -0.28 0.72
0.5 -0.5 -0.5 -0.5 1.5 0.5 0.5 -0.5 0.5 -0.5 -0.5 -0.5 0.5 0.5 0.5 -0.5 0.5 -0.5 -0.5 -0.5 -0.5 0.5 0.5 0.5 0.5 -0.5 -0.5 -0.5 0.5 0.5 -0.5 -0.5
0.26 -0.74 0.26 -0.74 0.26 0.26 1.26 0.26 0.26 -0.74 -0.74 -0.74 0.26 1.26 0.26 0.26 -0.74 0.26 -0.74 -0.74 -0.74 0.26 0.26 0.26 0.26 0.26 -0.74 -0.74 0.26 1.26 0.26
-0.97 -0.97 1.03 1.03 -0.97 0.03 2.03 -0.97 0.03 -0.97 0.03 0.03 -0.97 1.03 1.03 1.03 0.03 1.03 1.03 -0.97 -0.97 -0.97 2.03 -0.97 0.03 -0.97 0.03 -0.97 -0.97 0.03 2.03 -0.97
-0.22 -0.22 -0.22 -0.22 -0.22 -0.22 1.78 -0.22 -0.22 -0.22 -0.22 -0.22 -0.22 1.78 1.78 0.78 -0.22 -0.22 -0.22 -0.22 -0.22 -0.22 -0.22 -0.22 -0.22 -0.22 -0.22 -0.22 -0.22 -0.22 -0.22 -0.22
round(raw_iipsc.mean(axis=1, skipna=True), 2)


0    1.00
1    0.94
2    1.41
3    2.29
4    0.62
5    0.28
6    0.50
7    0.74
8    0.97
9    0.22
dtype: float64
round(ips_iipsc.mean(axis=1, skipna=True), 2)


0    0.0
1    0.0
2    0.0
3   -0.0
4    0.0
5    0.0
6    0.0
7    0.0
8    0.0
9    0.0
dtype: float64

Scoring item-level data

iipsc.info_scales()
The IIP-SC contains 8 scales:
├── PA (90°): Domineering
├── BC (135°): Vindictive
├── DE (180°): Cold
├── FG (225°): Socially avoidant
├── HI (270°): Nonassertive
├── JK (315°): Exploitable
├── LM (360°): Overly nurturant
└── NO (45°): Intrusive
scale_scores = score(
    data=raw_iipsc, items=np.arange(0, 32), append=False, instrument="iipsc"
)
GT(scale_scores.round(2))

PA BC DE FG HI JK LM NO
1.75 2.0 1.25 0.0 0.5 0.25 1.5 0.75
0.25 0.5 0.25 0.5 2.0 1.75 1.25 1.0
1.0 0.75 0.75 0.0 2.25 2.0 2.5 2.0
1.75 2.25 2.5 2.33 2.5 2.0 2.5 2.5
0.5 0.75 0.0 1.0 0.5 0.25 1.25 0.75
0.25 0.0 0.0 0.0 0.0 0.0 1.0 1.0
1.0 0.0 0.0 0.0 1.0 1.0 0.75 0.25
1.0 0.25 0.75 0.0 0.5 0.67 1.75 1.0
0.75 0.5 1.5 0.75 0.0 1.0 2.75 0.5
0.0 0.0 0.0 0.0 0.0 0.5 1.0 0.25

Standardizing scale-level data

iipsc.info_norms()
The IIP-SC currently has 2 normative data set(s):

1. 872 American college students
   Hopwood, Pincus, DeMoor, & Koonce (2011)
   https://doi.org/10.1080/00223890802388665
2. 106 American psychiatric outpatients
   Soldz, Budman, Demby, & Merry (1995)
   https://doi.org/10.1177/1073191195002001006

z_scales = iipsc.norm_standardize(
    data=scale_scores,
    scales=np.arange(0, 8),
    sample_id=1,
    append=False,
)
GT(z_scales.round(2))

PA_z BC_z DE_z FG_z HI_z JK_z LM_z NO_z
1.5 1.75 0.41 -1.11 -1.01 -1.33 0.04 -0.34
-0.77 -0.42 -0.76 -0.58 0.63 0.43 -0.26 -0.03
0.36 -0.06 -0.18 -1.11 0.91 0.72 1.25 1.22
1.5 2.11 1.87 1.36 1.18 0.72 1.25 1.84
-0.39 -0.06 -1.05 -0.05 -1.01 -1.33 -0.26 -0.34
-0.77 -1.15 -1.05 -1.11 -1.55 -1.62 -0.56 -0.03
0.36 -1.15 -1.05 -1.11 -0.46 -0.45 -0.87 -0.97
0.36 -0.79 -0.18 -1.11 -1.01 -0.84 0.35 -0.03
-0.02 -0.42 0.7 -0.31 -1.55 -0.45 1.56 -0.66
-1.15 -1.15 -1.05 -1.11 -1.55 -1.04 -0.56 -0.97
norm_df = norm_standardize(
    data=scale_scores,
    instrument="iipsc",
    scales=np.arange(0, 8),
    sample_id=1,
    append=False,
)

GT(norm_df.round(2))

PA_z BC_z DE_z FG_z HI_z JK_z LM_z NO_z
1.5 1.75 0.41 -1.11 -1.01 -1.33 0.04 -0.34
-0.77 -0.42 -0.76 -0.58 0.63 0.43 -0.26 -0.03
0.36 -0.06 -0.18 -1.11 0.91 0.72 1.25 1.22
1.5 2.11 1.87 1.36 1.18 0.72 1.25 1.84
-0.39 -0.06 -1.05 -0.05 -1.01 -1.33 -0.26 -0.34
-0.77 -1.15 -1.05 -1.11 -1.55 -1.62 -0.56 -0.03
0.36 -1.15 -1.05 -1.11 -0.46 -0.45 -0.87 -0.97
0.36 -0.79 -0.18 -1.11 -1.01 -0.84 0.35 -0.03
-0.02 -0.42 0.7 -0.31 -1.55 -0.45 1.56 -0.66
-1.15 -1.15 -1.05 -1.11 -1.55 -1.04 -0.56 -0.97