Psyc8501-DSA:

Dynamical Systems Analysis

Professor Steven M. Boker

This course intends to give the student a practical working understanding of some of the techniques for analysis of dynamical systems. Both theoretical ideas and practical applications will be covered, with special emphasis given to those techniques which are robust in the presence of chaotic dynamics.

The course will begin with an overview of the concepts and theory behind dynamical systems. A variety of examples of dynamical systems from Developmental, Social, Cognitive, Neuroscience and Clinical Psychology will be presented in order to give the student some perspective on when Dynamical Systems techniques might be useful.

During the second portion of the course we will develop hands--on familiarity with some different types of dynamical systems by using software (Maple and STELLA) that simulates different dynamical systems and plots their behavior. We will use this software to gain an intuitive understanding of different types of attractors and repellors that might occur in Psychological data.

The third portion of the class will cover some techniques for time series analysis. We will learn how to create time series plots, recurrence diagrams and phase space plots. We will learn about Fourier transforms and how to read a Fourier periodogram plot. We will end the time series section with a discussion of stationarity and ergodicity, two concepts important when creating models of time series. During the time series portion of the class, we will learn to use a program called Splus. This is a Windows and Unix program that makes it easy to perform many of the common time series analysis functions.

Next, some practical methods for determining optimal sampling lag, embedding dimension, fractal dimension and nonlinear dependency from a sampled time series will be presented. During this portion of the course, the students will use programs written by the instructor which can perform these calculations on the student's own data.

The remainder of the course will be devoted to the analysis of real world problems and the development and testing of dynamical systems models for behavior.

Computer work associated with the course will involve working with R, Mathematica, and OpenMx as well as some new programs. Computer work will be used to develop an intuitive understanding of some simple dynamical systems. Students will also learn to use computer software to perform a dynamical systems analysis on real psychological data sets.

R and Mx Homework Files.

  • VectorFields1.R and VectorFields2.R simulate autoregressive processes and plots some vector fields using R or Splus. Work through the program, plotting and looking at results as you go.
  • FirstOrderVF.nb plots vector fields using Mathematica. Run the program and become familiar with how Mathematica works.
  • DifferentialEQs1.nb and DifferentialEQs3.nb simulate trajectories of differential equations using Mathematica.
  • DifferenceEQs.nb simulates trajectories using a simple difference equation.
  • GrowthSystems.nb simulates three common types of growth systems: Exponential decay to an asymptote, logistic growth, and Gompertz growth.
  • PredatorPrey1.nb simulates trajectories of a predator and prey system and NeuralOscillator1.nb simulates trajectories of coupled neural oscillators.
  • ACF-CCF-1.R demonstrates how to calculate and plot autocorrelation and crosscorrelation functions.
  • ACF-Statespace.R demonstrates how to use time shuffled surrogates to calculate and plot empirical critical values for the autocorrelation function.
  • FFT1.S simulates two correlated sine wave time series and calculates the Fast Fourier Transform (FFT) of these two data vectors. What happens when you change the frequencies for sine wave 1? Add two more frequencies to sine wave 1 and then plot the power spectrum graphs again. What has changed? Increase the "b-weight" by which sine wave 1 affects sine wave 2. How does this change the power spectrum for sine wave 2?
  • FFT2.S reads in a compound sine wave time series and calculates the Fast Fourier Transform (FFT) of this data vector. Read in the following data files and report the frequencies of the pure sine waves that compose the compound wave. sine1.dat sine2.dat sine3.dat sine4.dat sine5.dat sine6.dat sine7.dat sine8.dat sine9.dat sine10.dat
  • This is a reprint of the Boker & Nesselroade (2002) article describing the Local Linear Approximation method for estimating derivatives and parameters for differential equations.
  • LLA_example1.S is an Splus program that shows how to run a simple single level Local Linear Approximation analysis to estimate coefficients for a second order linear differential equation. testLLA.dat is the data file that is read in by the example program.
  • LDE_example1.S and LDE_example2.S are Splus programs that show how to set up to run a simple Latent Differential Equations analysis to estimate coefficients for a second order linear differential equation. These programs call mx scripts LDEexample1.mx and LDEexample2.mx respectively. testLDE.dat is the data file that is read in by the example programs. You will also need rungeAuto1.mx, rungeAuto2.mx, rungeAuto3.mx, rungeAuto4.mx, and rungeAuto5.mx DifferentialEQsSim.nb

Nonlinear Dynamics Homework Files.

  • lor63.dat, britain.dat, henon.dat, logistic.dat, and koch.dat are data files for the mutual information and fractal dimension homework.
  • MInfoPlot1.S is an Splus program that plots the nonlinear dependency for the Lorenz system. Modify the program to read in and calculate and plot the mutual information for the coastline of Britain. (remember that the britain.dat file has the number of samples in the first line so you'll need to use skip=1 to read it in). You will need the Sun version of nldcalc . Be sure to download in binary mode! After the transfer is complete, from a unix prompt on stats type "chmod u+x nldcalc" to set the executable permission for nldcalc so that it can run as a program.
  • Download the fd3 program for calculating fractal dimenson. Calculate the Box Counting, Correlation and Information dimensions for the five data files above. After the transfer is complete, from a unix prompt on stats type "chmod u+x fd3" to set the executable permission for fd3 so that it can run as a program.
  • SurrogatePlot1.S is an Splus program that plots the nonlinear dependency and autocorrelation for the Lorenz system and for 20 time shuffled surrogates. Modify the program to read in and calculate and plot surrogates for the coastline of Britain.
  • Windowed Cross Correlation and Peak Picking are methods for estimating the strengths and phase lags of time varying linear effects between two physiological data vectors. The source code for the windowed cross correlation and peak picking are in an archive file that can be downloaded here. These source files have been tested under Solaris Unix, but are generic C and should be able to be compiled under Windows with a minimum of effort. The article describing the algorithm is here

Steven M. Boker
Department of Psychology
University of Virginia
Gilmer Hall Room 102
Charlottesville, VA 22903
Office: 434-243-7275, FAX: 434-982-4766
e-mail: boker@virginia.edu