Quick Reference
To define global and default conditions for the run, type:
a;opt1[; opt2; ... ]
at the start of the tabulation section.
Global run conditions, if any, are defined on the a statement. If used, it must be the first statement in the tabulation section. Its format is:
a;options
where options are keywords defining the global characteristics of the run. You can use as many keywords as you like and you can list them in any order, but you must separate them with semicolons (;), for example:
a;dsp;op=12;date;dec=1
Quantum User’s Guide Volume 2
The hierarchy of the tabulation section – Chapter 2 / 9 This statement tells Quantum that all rows will be double-spaced (dsp), cells will contain absolute figures and column percentages (op=12), the date will be printed on each table (date) and absolutes will be shown to one decimal place (dec=1). These and all other options are described below.
Most options which are valid on the a statement are also valid on sectbeg, flt or tab statements. In this chapter, unless an option’s description specifically states that the option is not valid on particular statements, you may assume that the option is valid on a, sectbeg, flt and tab statements.
Where a keyword appears on two or more of these statements, the setting at the lower level will override the setting at the higher level for that table or group of tables only. For example, if the same option is present with different values on a flt and a tab statement, the option on the tab will override the option on the flt for that table only. Similarly, where an option is present on both the a statement and a flt, the option on the a statement will be overridden by the option on the flt until another flt is read.
☞
For further information about this concept of overriding options, see section 7.2, ‘Options on the tab statement’ and section 9.2, ‘Named filters’.Options on a, sectbeg, flt and tab statements
Options can be divided into two categories: output options and data options. The former determine the format of each table in the run, but have nothing to do with the numbers in each cell, whereas the latter determine how the cell counts are to be created but have nothing to do with the overall appearance of the tables.
Jobs in which only the output options have been changed can be rerun without rereading the data, but jobs in which data options have been altered must be rerun just as if they were new jobs.
☞
For further information on running Quantum, see chapter 16, ‘Running Quantum under Unix and DOS’ in the Quantum User’s Guide Volume 1.Quantum User’s Guide Volume 2
10 / The hierarchy of the tabulation section – Chapter 2 Output options
Output options are those which affect the way your tables are formatted and printed. They do not determine how the data is tabulated or how the individual cell counts are calculated.
Unless otherwise stated, all options are valid on a, sectbeg, flt and tab statements.
☞
For further information about analysis levels, see chapter 3, ‘Dealing with hierarchical data’in the Quantum User’s Guide Volume 3.
✎
Do not use baft with ttbeg=base since the two are incompatible.☞
For a full discussion about creating column headings, see section 6.5, ‘Manual set-up’.acr100 This prints the text ‘100%’ on each cell of the base column when row percentages are requested with op=0. Normally, a base column contains absolute figures only.
If acr100 is used without row percentages, it is ignored.
anlev= Defines the analysis level at which axes are to be cross-tabulated in a hierarchical (trailer card) job.
axttx This option creates table titles of the form ‘axis name by axis name’. x can be l (lowercase L) for a title printed in the left, c for a title printed in the center of the line, r for a title on the right, or a number between 1 and 9 to have the title indented by ten times that amount of spaces. For instance axtt5 will indent the title by 50 spaces. You may also type axttg to have the start of the title lined up with the start of the column headings.
baft This keyword causes any table titles starting with the word ‘Base’ to be printed after all other titles for that table. If the keyword base appears on a ttbeg/ttend/ttord statement and baft is also used, an error message is generated.
colwid=n Defines the width of columns in the printed tables where no p statements exist in the column axis.
csort Sort tables column-wise (i.e., horizontal sorting rather than vertical row-wise sorting).
date By default, tables are printed without a date. Use of the keyword date causes the current date to be printed in the top right-hand corner of each table. The date is in the format dd mmm yy; for example, 3OCT00.
dec=n This determines the number of decimal places for absolute figures. If dec= is not used, the default of no decimal places is assumed.
Quantum User’s Guide Volume 2
The hierarchy of the tabulation section – Chapter 2 / 11
✎
Remember that Quantum’s calculations are accurate to six digits only.☞
For information on the flt= statement, see section 9.2, ‘Named filters’.
decp=n This sets the number of decimal places required for percentages. The default is decp=1 meaning one decimal place. This applies when op=0, 2, 7 or & (see below). Any number of decimal places are allowed, as long as you make each column wide enough to accommodate them.
dsp This leaves one blank line between each row of data in a table. Without this, one line follows directly underneath another.
flt=name Invokes the filter conditions and titles named on the flt= statement. If the filter defines conditions, the rules governing data options apply. This option is valid on sectbeg, flt and tab statements, but not on the a statement.
flush Causes rows containing percentages to be printed with the percentages directly below the absolutes rather than one column to the right. Let’s say that a column contains an absolute figure of 39 which is 15.1% of the total. Here is the difference in the output between using and not using flush:
39
As you can see, flush prints the right-most digits of the absolute and percentage figures one under the other; it does not print the percentage sign underneath the absolute number.
Where further adjustments are necessary, use pcpos= as described later in this section.
font=(ttype=fnum, ... )
You use this keyword when you want your tables to be printed in PostScript on a laser printer. font= defines the fonts in which various types of output are to be printed. Fonts are entered in the format shown above where ttype defines the text type and fnum is the number of the font (between 0 and 9) to be used for that text.
Fonts and the numbers which represent them are defined on a per site basis: your system administrator will know what they are. Text types are:
def default font
a text following the a statement bot text following bot statements foot text following foot statements flt text following flt statements
Quantum User’s Guide Volume 2
12 / The hierarchy of the tabulation section – Chapter 2
☞
For further information about laser printing, see chapter 9, ‘Laser printed tables with PostScript’ in the Quantum User’s Guide Volume 3.tab text following tab statements
tb table numbers
sidett titles after the row l statement toptt titles after the column l statement stub row element texts
text n03 and n23 texts
banner g statement / column n01 texts numb all numbers
pc all percentages colpc column percentages rowpc row percentages
stats statistical row texts and numbers page page text and numbers
type output type text date the date
Text for which no font is defined is automatically printed in the standard laser printing font.
If most of the table is to be printed in the same font, you may define this font as the default font (using the text type def=). However, if this option is used, it must precede all other options.
Similarly, you may use the option pc to define a font for all percentage figures, but if you then wish to have row and/or column percentages in yet another font, the options rowpc and/or colpc must follow pc otherwise they will be overridden by the more general percentage font.
Let’s say that we have three fonts; 1 is standard type, 2 is bold and 3 is italic. We wish to have all run level titles (that is, those following the a statement) printed in a bold font and all percentages in italics. We would write:
a;font=(a=2,pc=3)
All other texts are printed in font number 1, the standard font.
Because of the way in which Quantum stores the font changes, tables to be laser printed must have a page width of 132 or 158 characters defined on the a statement.
Do not use font= if you do not want to use PostScript printing because it causes the font numbers to be printed on the right side of the tab_ file.
Quantum User’s Guide Volume 2
The hierarchy of the tabulation section – Chapter 2 / 13
☞
For further information on graphics files, see chapter 2, ‘Files created by Quantum’ in the Quantum User’s Guide Volume 4.☞
For further information, see section 7.6, ‘Printing more than one table per page’.☞
For further information, see section 7.3, ‘Multilingual surveys’.graph= Produces SYLK format files for use with graphics or spreadsheet packages which read this type of files (for example, Chart, Graphwriter for graphics and Symphony for spreadsheet applications). A separate file is created for each table containing the statements necessary to reproduce the table as a 2-dimensional bar chart.
By default, Quantum removes all base elements and only saves absolute figures.
Table title are created from the row axis according to the hierarchy hd=, ttl, n23 using the first title found. If none of these types of title exists, a title of the form
‘row axis by column axis’ is generated, as in the axtt option. You may override any or all of these defaults by using the parameters listed below:
rb show row base figures.
cb show column base figures.
pc show percentages only. Where tables are created with more than one type of percentage, the priority is column then row then total percents.
text graph title.
hitch= Prints the current table on the same page as the previous table if there is room for the whole table on the page. If the current table has more than one page, Quantum prints its first page on the same page as the previous table.
indent=n Where a row text is longer than the space allocated to the row text in the table, Quantum breaks the line in between words and continues the text on the next line.
To have these continuation lines indented from the left margin, specify the amount of indentation required with indent=. Texts may be indented by between 0 and 15 spaces: the default is indent=0.
lang=xxx This is only valid on a and tab statements:
• On the a statement, it specifies that this is a multilingual survey and xxx is the one to three character code of the default language.
• On the tab statement, xxx specifies the language in which axis texts are to be printed.
When used on a tab statement, the default language must be specified on the a statement.
Quantum User’s Guide Volume 2
14 / The hierarchy of the tabulation section – Chapter 2
☞
For information on manipulating elements and tables, see chapter 2, ‘Row and table manipulation’ in the Quantum User’s Guide Volume 3.☞
For an example and a more detailed explanation, see ‘Accumulation of suppressed elements by net level’ in chapter 3, ‘Introduction to axes’.linesaft= Defines the number of blank lines to print after the last line of column headings.
The default is one blank line.
linesbef= Defines the number of blank lines to print before the first line of column headings.
The default is two blank lines.
manipz Apply spechar, nz, nzrow and nzcol to elements created using manipulation.
netsm Indicates that suppressed elements should be collected into an element flagged with smsup+ only if that element is at the same level as the suppressed elements.
For example, if an element at net level 2 is suppressed because its cell counts are below a given value, that element will only be included in the table if there is an element with smsup+ at level 2 into which it can be added.
Without netsm, suppressed elements will be added into the next smsup+ element regardless of whether it is at the correct level. Thus, an smsup+ element at level 2 may contain elements at level 2 and also any previously suppressed elements from level 1.
netsort This statement is valid on a and l statements only.
Requests that nets defined with the net statement should be sorted according to their net level. This means that nets at level 1 will be sorted and, within them, nets at level 2, and so on. Elements within a net are also sorted.
When netsort is used, each level below level 1 will be indented by 2 spaces per level — thus nets at level 2 are indented by 2 spaces (1×2 spaces); nets at level 3 are indented by 4 spaces (2×2 spaces). The elements comprising a net are indented by an additional two spaces.
The number of spaces indentation can be varied using netsort=n, where n is a whole number in the range 1 to 9, and is the number of spaces by which to indent.
For example, netsort=3 will indent by multiples of 3 spaces. If a global indentation is set for all sorted tables of nets in the run, it may be turned off for an individual table by entering nonetsort or netsort=0 on the l statement for the table’s row axis.
Quantum User’s Guide Volume 2
The hierarchy of the tabulation section – Chapter 2 / 15
✎
For netsort to work, the keyword sort must be present on the same statement as netsort or on a statement at a higher level. For example, to sort the nets in a single table, place netsort on the l statement of the row axis and sort on the a, sectbeg, flt or tab statement.☞
For examples of nets and sorted nets, see section 3.6, ‘Netting’ in this volume and section 6.3,‘Sorting tables’ in the Quantum User’s Guide Volume 3.
For more details about subsorts, see ‘Sorting with subsort and endsort’ in chapter 6, ‘Other tabulation facilities’ in the Quantum User’s Guide Volume 3.
☞
For further information, see section 7.8, ‘Overlapping data’ in the Quantum User’s Guide Volume 3.☞
For further information, see ‘Suppressing footnotes’ in chapter 7, ‘Special T statistics’ in the Quantum User’s Guide Volume 3.☞
For a description of how to create column headings with g statements, see chapter 6, ‘Using axes as columns’.nooverlapfoot Suppress the footnote that is automatically printed on tables with special T-statistics run on overlapping data.
noprint Suppresses the printing of a table.
notauto Suppresses the automatic footnotes that describe which special T-statistics have been applied to a table.
notbl Suppresses table numbers requested with tbl or tbr statements.
nzcol Suppresses the printing of columns where all cells are zero or round to zero.
When columns are suppressed in an axis whose column headings are defined on g statements, Quantum ignores the g statements and creates its own column headings using the texts defined on the elements themselves.
nzrow Suppresses the printing of rows where all cells are zero or round to zero.
op=n This keyword governs the type of output in the tables. Output types are:
& Total percentages. The value in the cell is percentaged against the number in the upper left-hand corner of the table (normally the base) rather than on the totals in the relevant column or row. If the table contains more than one base element, percentages are calculated using the leftmost figure in the most recent base element.
Quantum User’s Guide Volume 2
16 / The hierarchy of the tabulation section – Chapter 2
✎
You may not request row and column ranks in the same table.✎
You may not request row and column ranks in the same table.☞
For an example, see section 3.6, ‘Netting’.– Row rank figures are printed below each cell. Figures are ranked within rows, using 1 for the largest figure. Where two or more numbers have the same rank, they are all assigned the lowest rank possible. Thus, if the previous rank was 2 and the next value to be ranked occurs in the row three times, those numbers will all be ranked 5.
0 Row percentages.
1 Absolute figures (default).
2 Column percentages.
3 Column rank figures are printed below each cell. Figures are ranked within columns, using 1 for the largest figure. Where two or more numbers have the same rank, they are all assigned the lowest rank possible. Thus, if the previous rank was 2 and the next value to be ranked occurs in the column three times, those numbers will all be ranked 5.
5 Prints the text ‘100%’ on each cell of the base row.
6 Used with op=2 to produce two percentages for each cell. The first is the percentage of the cell against a redefined base, and the second is the percentage of the cell against the first base in the axis.
You might use this when you have a table showing which of two products people preferred, and their reasons for preferring this product. Percentages could be calculated against a redefined base such as ‘All preferring Brand A’.
and then against the first base (all respondents).
7 Cumulative percentages.
8 Indices. The index for a cell is generated by dividing the row percentage in the cell by the row percentage in the base row. If the table contains more than one base row, indices are calculated using the row percentage in the most recent base row. It shows you how closely the percentages in the current row reflect those in the base row. The nearer the index is to 100%, the more closely the current row mirrors the base row.
Quantum User’s Guide Volume 2
The hierarchy of the tabulation section – Chapter 2 / 17 9 Prints absolutes and percentages side by side. Four columns are allocated to
the percentage if it has no decimal places; percentages with decimal places are allocated 5+decp columns (for example, seven columns for percentages with decp=2).
When a cell contains absolutes and percentages and op=9 is not used, the absolute figure is printed on the top line with the column and row percentages on the second and third lines respectively.
94 This is a variation of op=9 which allocates three columns to percentages with no decimal places, and 4+decp columns where there are one or more decimal places.
This can be useful for tables with very wide column axes where no column contains 100%.
When you create a table with more than one output type, Quantum prints the different values one under the other in each cell. If you’d prefer to have a separate table created for each output type (e.g., absolutes and column percentages as separate tables rather than both on the same table), enter the letter s in upper or
When you create a table with more than one output type, Quantum prints the different values one under the other in each cell. If you’d prefer to have a separate table created for each output type (e.g., absolutes and column percentages as separate tables rather than both on the same table), enter the letter s in upper or