Administrative functions > Data conversion programs > Converting Quantum data and programs with nqtspss > Running Quantum and nqtspss
 
Running Quantum and nqtspss
To create an nqtspss data description and data set, run Quantum using the version that does not delete its intermediate files (or use the –k option with the standard version). Then type:
nqtspss [options]
options are one or more optional keywords that determine how the SPSS files are created (see below).
Files created
nqtspss reads the Quantum intermediate files and creates two files:
commands.qsp
The SPSS data description.
data.qsp
The transformed data set.
Options
Unless otherwise stated, options may be entered in uppercase or lowercase.
–an
Changes the layout of the data description file (that is, commands.qsp) depending on the value of n:
a0
The output is unchanged (this is the default).
a1
Quantum inserts a new line containing a single asterisk following the last line output for each axis in the Quantum run.
a2
Quantum inserts a new line containing a single asterisk following the last line output for each variable label section in the Quantum run.
Non-numeric specifications are treated as 0 (zero); values greater than 2 are treated as 2.
–c
When an axis is converted into a number of binary variables, a respondent’s presence in an element is normally shown by a value of 1 in that variable. If the respondent is not present in the element, the variable is zero instead. With –c you can request that the value for presence in an element should correspond to the element’s position in the axis. For example, the variable for green generated from the multicoded axis specification:
l color;hd=Colors chosen
col 54;Base;Red;Blue;Yellow;Green
is:
VARIABLE LABELS @color4 "Colors chosen"
VALUE LABELS @color4
0 "Not Green"
4 "Green"
–E
If your numeric variables have been created using the inc= keyword and you have also defined the variable’s description with hd= on the l statement, Quantum produces two variables. You can use this option to merge the two variables into a single variable. For example, if a Quantum program contains:
tab liters liters
l liters;hd=Number of liters bought
n01;inc=liters
using this option creates one variable containing all the information about this variable rather than two in the SPSS data description. In this example, the variable liters is defined as:
VARIABLE LABELS liters "Number of liters bought"
The second variable whose name would normally start with the letter A (for example, Aiters) is not created.
fn.d
Defines the format of values in numeric variables.
n is the maximum number of characters per value, including the decimal point.
d is the number of decimal places required.
For example, with –f6.2, the value 365.26001 becomes 365.26.
–h
Display a list of options.
–k
Indicates that for element texts that start with a number, variables should be numbered according to those values rather than sequentially from one. If an element text does not start with a number, it is assigned a value one greater than the current maximum value so far. For example:
l age;hd=Age of respondent
val c(20,21);Base;i;1-20;21–24;25–34;35–44;45–54;
+55–64;65-99
normally becomes:
VARIABLE LABELS age "Age of respondent"
VALUE LABELS age
1 "1-20"
2 "21–24"
3 "25–34"
4 "35–44"
5 "45–54"
6 "55–64"
7 "65-99"
but with –k, the values are:
VARIABLE LABELS age "Age of respondent"
VALUE LABELS age
01 "1-20"
21 "21–24"
25 "25–34"
35 "35–44"
45 "45–54"
55 "55–64"
65 "65-99"
In order for nqtspss to convert numeric-labeled axes correctly, make sure that the element texts are written using the same type of unit value. For example, if elements are numbered in minutes, they should all be numbered in minutes, not in hours and minutes.
–mvalue
Defines the missing value. This overrides the default of -99.99.
‑nlen
Specifies the maximum number of characters to be used in exported variable names.
Variable names longer than eight characters are supported only by SPSS version 12 and later.
–o file_name
Processes the options from the specified file (see Options in an options file). The options in this file are treated as though they were specified directly in the place where the file was introduced within the run command. The –o option cannot be used within an options file.
–p=language
Specifies which language should be used for the output. Where language is the one to three character code of the language required for the output; for example p=nld for Dutch. For this to be successful, translations must be available in this language in the ptf file. If no language is specified, the survey’s default language is automatically used.
–qn
Sets the maximum length for variable labels to a specified number of characters. If you omit this option, Quantum uses the default of 40 characters; any excess text is ignored.
–rn
Sets the maximum length for value labels to a specified number of characters. If you omit this option, Quantum uses the default of 20 characters; any excess text is ignored.
Note The –q and –r values cannot be less than 8. Also, the quotes included in the variable labels do not form part of this count. In addition, the values may be preceded by an equals sign, but it is not mandatory. For example, entering –q=18 is the same as entering –q18.
–s
The title on the VARIABLE LABELS statement is the same as the axis heading defined with hd= on the l statement. If the heading starts with the same word as the axis name starts with, this option will omit that word from the axis title. If you enter the option in upper case, nqtspss will ignore the case of the axis name and the heading text when comparing them; if you enter it in lower case, nqtspss will differentiate between upper and lower case. For example:
l q3;hd=Q3 - color chosen
is usually shown as:
VARIABLE LABELS q3 "Q3 - color chosen"
but with –S it becomes:
VARIABLE LABELS q3 "- color chosen"
With –s the full heading text would be printed because the first word of the text is not in the same case as the axis name.
The same applies to VALUE LABELS in which the value text starts with the value itself.
If you apply the options –k and –S to the age axis above, it becomes:
VARIABLE LABELS age "of Respondent"
VALUE LABELS age
1 "Under 21"
21 "–24"
25 "–34"
35 "–44"
45 "–54"
55 "–64"
65 "Over 64"
Note When deciding whether to suppress a number, nqtspss looks at it as a string rather than as a numeric value. Thus, 01 is not seen as being the same as 1.
See also
Converting Quantum data and programs with nqtspss