Brian O'Connor   UBCO Psychology   UBCO  

R, SPSS, SAS, and MATLAB Programs for Addressing Interdependence and

Basic Levels-of-Analysis Issues in Psychological Data


O'Connor, B. P. (2004). SPSS and SAS programs for addressing interdependence and basic levels-of-analysis issues in psychological data. Behavior Research Methods, Instrumentation, and Computers, 36, 17-28.

Levels-of-analysis issues arise whenever individual-level data are collected from more than person from the same dyad, family, classroom, work group, or other interaction unit. Interdependence in data from individuals in the same interaction units also violates the independence of observations assumption that underlies commonly-used statistical tests. This article describes the data analysis challenges that are presented by these issues, and presents SPSS and SAS programs for conducting appropriate analyses. The programs conduct the Within-And-Between-Analyses (WABA) described by Dansereau, Alutto, and Yammarino (1984), Yammarino (1998), and Schriesheim (1995), and the dyad-level analyses described by Gonzalez and Griffin (1999) and Griffin and Gonzalez (1995). Contrasts with general multilevel modeling procedures are then discussed.



MATLAB: ggdist.sps
Correlational Analysis of Dyad-Level Data in the Distinguishable-Case ggexch.sps
Correlational Analyses of Dyad-Level Data in the Exchangeable-Case waba.sps

WABA - Within And Between Groups Analysis


WABA - Multiple Relationship Analysis


WABA - Moderated Regression Analysis



There is an R package named "WABA" that runs these and other analyses (revised November, 2018).

Run these commands to install and use the package:

install.packages("remotes", dependencies = TRUE) # install the remotes package

library(remotes) # load the remotes package

remotes::install_github("bpoconnor/WABA") # use remotes to install WABA from github

# if you get prompted about more recent versions of packages, select and choose to update them all


The WABA package files are on GitHub

click here for the Reference manual for the WABA package

Brian P. O'Connor
Department of Psychology
University of British Columbia - Okanagan
Kelowna, British Columbia, Canada