I have old syntax files (*.sps) which include old TABLES command syntax. I know TABLES command has been replaced by CTABLES command syntax long time ago but I would like to know if there is a similar concept for the old TABLES subcommand /OBSERVATION = varlist within CTABLES and how I can convert Tables syntax to Ctables syntax? I am using IBM SPSS Statistics 21 release.
On old TABLES syntax command an observation variable (/Observation = varname ; or varlist) is a variable that define the base for the cell values which are computed. So the cell Statistics is computed for the observation variable.
For example assume this simple TABLES syntax for Employee Data.sav from the samples folder in IBM SPSS Statistics installation directory:
GET FILE='C:\Program Files\IBM\SPSS\Statistics\21\Samples\English\Employee data.sav'.
/OBSERVATION = salary
/TABLE = jobcat by gender > salary
/STATISTICS = MEAN (salary (F4.1)'Mean').
On the /Table subcommand you see a crosstab with variable jobcat in the row and gender in the column. Below gender salary variable is nested on column dimension. We would like to have the mean for salary displayed for each cell combination with gender categories and jobcat categories, therefore salary is the observation variable. If you run this command (you need a license code with Old Tables module enabled) you get this table:
You see mean values for current salary for female and male for each job category. As there are no females in jobcat 'custodial' no mean can be computed.
With Ctables the same table can be generated with:
/TABLE jobcat[C] BY gender[C]>salary[S][MEAN,'Mean',F4.1].
If you have more syntax files including old Tables commands you can convert them to Ctables format with Syntaxconverter tool.
Please open the online Help (Help Topics) in Statistics and browse to:
Help > Core System > TABLES and IGRAPH Command Syntax Converter topic
Please note, for conversion there are limitations and the syntaxconverter tool can not convert all old TABLES commands as some concepts are obsolete.
On the help topic it is also described how to use the syntaxconverter tool and to start it from command prompt.