Brian O'Connor   UBCO Psychology   UBCO  

Simple and Flexible R, SPSS, and SAS Programs

for Analyzing Lag-Sequential Categorical Data

Reference:

O'Connor, B. P. (1999). Simple and flexible SAS and SPSS programs for analyzing lag-sequential categorical data. Behavior Research Methods, Instrumentation, and Computers, 31, 718-726.

The above paper describes simple and flexible programs for conducting lag sequential event analyses using SAS and SPSS. An R package on CRAN is also available. All of the programs read a stream of codes and produce a variety of lag sequential statistics, including transitional frequencies, expected transitional frequencies, transitional probabilities, z values, adjusted residuals, Yule's Q values, likelihood ratio tests of stationarity across time and homogeneity across groups or segments, transformed kappas for unidirectional dependence, bidirectional dependence, parallel and nonparallel dominance, and significance levels based on both parametric and randomization tests.

Click on a program to view its contents. Copy and paste into a file.

SPSS: SAS: Fortran 77:
SEQUENTIAL SEQUENTIAL SEQUENTIAL
SEQGROUPS SEQGROUPS
BIDIRECTIONAL BIDIRECTIONAL BIDIRECTIONAL
TWOCELLS TWOCELLS TWOCELLS
PARADOM PARADOM PARADOM
NONPARADOM NONPARADOM NONPARADOM

The programs below are the same as the above programs, except that they can run data from more than one session/dyad/group in one job run, and selected output can be saved for further processing.

SPSS: SAS:
SEQUENTIAL-2 SEQUENTIAL-2
BIDIRECTIONAL-2 BIDIRECTIONAL-2
TWOCELLS-2 TWOCELLS-2
PARADOM-2 PARADOM-2
NONPARADOM-2 NONPARADOM-2

For more information on the programs, see the Program Notes.


R:

There is an R package named "LagSequential" on the R CRAN site that runs the same analyses.

The package was written in collaboration with Zakary Draper.

Run these commands to install and use the package:

install.packages("LagSequential")

library(LagSequential)

# example command for trial data:

sequential(data_sequential)

Click here for the reference manual for the LagSequential package.


Brian P. O'Connor
Department of Psychology
University of British Columbia - Okanagan
Kelowna, British Columbia, Canada
brian.oconnor@ubc.ca