<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>FAQ/recode</title><revhistory><revision><revnumber>1</revnumber><date>2014-03-07 12:28:22</date><authorinitials>PeterWatson</authorinitials></revision></revhistory></articleinfo><section><title>Swapping over levels on a categorical variable in SPSS</title><para>This is most quickly done using the syntax below which can be adapted as necessary. In this example groups 1 and 3 are swapped in the OCCASION variable and saved into a new variable called OCCASION2. </para><screen><![CDATA[RECODE OCCASION (3=1) (2=2) (1=3) INTO OCCASION2.
EXECUTE.]]></screen></section></article>