These pages contain SPSS programs with a minimum of documentation or
explanation. These pages often reflect samples that we have created in solving a
problem for someone during consulting. If we do not have time to make a proper FAQ
or Learning Module, we place the example program here so it may be publicly available
until we have time to make a proper FAQ page or Learning Module page. Until then, we
hope that these examples may prove useful to some of you. If you are not sure if you
are properly using any of these code fragments (and you are a member of the UCLA research
community) please use our consulting
services so we may help you properly use these examples. Many of these examples
are tricky and complicated, so if you are in doubt, please let us assist you.
- Simple main effects on within subjects factors
- Using do repeat and count
- Renaming variables
dynamically - Using aggregate
- Graphing results in logistic regression
- Doubly multivariate MANOVA in SPSS
- Repeated measures ANOVA and adjusted levels of
significance - Making dummy variables
- Converting string to numeric variables
- Looping with dates
- Reading raw data files over 1024 columns wide
- A macro programming example
- Computing intraclass correlations
- Reading matrix data into SPSS
- GEE Models for Correlated Binary Data
- Three-level multilevel models in SPSS
- Reading a multiple-line-per-subject data file
- Generating id numbers within group or
panel - Numbering groups consecutively
- Looping without scratch variables
in SPSS macros - Converting SAS or Stata dates to
SPSS dates - Reading and Analyzing the Hospital Doctor Patient Dataset
- Reshaping data long to wide (without casestovars)
- Reshaping data wide to long (without varstocases)