Tables and axes > More about axes > Options on n, col, val, fld and bit statements > Data options
 
Data options
Data options determine how the counts in the table are calculated. These options do not affect how the axis is laid out.
c=logical_expression
Defines the conditions for an element. c= is only valid on n statements.
For more information about c=, see Defining conditions for an element.
effbase
Print an effective base element in a weighted table.
effbase affects the processing of special c=– conditions. If you want to print an effective base without affecting the processing of these special statements, use an n31 statement and not effbase.
For more information about the n31 statement, see Printing the effective base.
For more information about the effective base, see T statistics on weighted tables.
ex=expression
Alters the figures in the row using row manipulation techniques.
These are described in Manipulation on N-statements.
fac=n
Defines a factor to be used in statistical calculations. It is generally required when the data is multicoded or the codes in the data are not the values to be used for the calculation of means, standard errors and suchlike.
Factors (n) can be real or integer. Normally, you will be told when factors are required. A typical example might be a question asking respondents to rate a product on a scale of 1 to 5, where 1 is excellent and 5 is very poor. The responses will appear in the data as 1 to 5, but the factors for the calculation of a mean score can be +2 (excellent) to -2 (very poor).
Assigning a factor of zero is not the same as assigning no factor at all. A factor of zero causes all cells in that row or column to be multiplied or divided by zero when they are included in statistical calculations, whereas no factor at all causes them to be ignored completely by the statistical statements. This is an example of an axis using fac=:
n10Base
n23Rating for Brown's Baked Beans
n01Excellent;c=c127'1';fac=2
n01Good;c=c127'2';fac=1
n01Acceptable;c=c127'3';fac=0
n01Poor;c=c127'4';fac=–1
n01Very poor;c=c127'5';fac=–2
n01DK/NA;c=–
When used on a col or val statement, fac= becomes more flexible. If the factor is to be incremented or decremented progressively by a constant for each row of the axis, you can enter the factor for the first row and follow it with the amount by which it is to be incremented or decremented when applied to all subsequent rows.
The example used above could be rewritten:
col 127;Base;Excellent;%fac=2-1;Good;Acceptable;Poor;
+Very poor;DK/NA;%nofac
This still assigns a factor of 2 to Excellent, 1 to Good, and so on down to a factor of -2 for Very poor. The option nofac attached to ‘DK/NA’ indicates that this element should have no factor at all, thus it will be ignored by all statistical statements. It is the same as omitting fac= from an n01 statement.
The factor does not alter the figures in the row itself: if you want to define a scaling factor to increase or decrease the figures in the row by a given amount, use the option scale= which is described below.
For further examples of fac=, see Statistical functions and totals.
inc=arithmetic_expression
In most tables, cells are counts of people because each cell is incremented by 1.0 for each respondent included in that cell. Cells can also be incremented by the value of an arithmetic expression; for example, you might want to know how many boxes of dog biscuits a respondent bought, or the number of children there are in a household.
In both cases, you can produce the table using the appropriate axes for row and column definitions, but instead of incrementing the cells by 1 for each respondent, you would increment it by the number of boxes of dog biscuits they bought or the number of children in their household. (This presupposes, of course, that this information is available somewhere in the data file).
To increment cells by the value of an arithmetic expression rather than by 1, use the option inc=arithmetic_expression.
For example, you might have a question asking how many times the respondent visits various shops in a week. The information is stored in the following columns:
c(109,110) = Safeway
c(111,112) = Sainsbury
c(113,114) = International
c(115,116) = Tesco
You need to create a table showing the total number of times each shop is visited. This entails incrementing each cell in a given row by the number in the relevant columns, for example, if row 1 refers to Safeway, cells in that row need to be incremented by the value in c(109,110).
Set up an axis in which each row refers to a different shop, and use inc= to define the columns whose values are to be added into the cell:
l shop
n04Total Visits;base
n01Safeway;inc=c(109,110)
n01Sainsbury;inc=c(111,112)
n01International;inc=c(113,114)
n01Tesco;inc=c(115,116)
This example uses an n04 statement to produce a count of the total number of visits made, and the keyword base on this statement to use it as a base for percentaging.
For more information about n04s, see Statistical functions and totals.
                                 Area of Residence
                     Base     Area 1     Area 2     Area 3

Total Visits         2109        413        882        814
Shops Visited
Safeway               635        143        257        235
                       30%        35%        29%        29%
Sainsbury             424         95        172        157
                       20%        23%        20%        19%
International         630        105        272        253
                       30%        25%        31%        31%
Tesco                 420         70        181        169
                       20%        17%        20%        21%
If the variable used with inc= is non-numeric, or the value of the arithmetic expression is based on non-numeric data, it is ignored if missing values processing is switched on for the tabulation section. Using the shop axis shown earlier, this is the equivalent of writing statements of the form:
n01Safeway;inc=c(109,110);
+c=c(109,110).gt.0 .or. c(109,110)=$00$
However, if missing values processing is not in force, you need to include a condition in order to exclude any blank or non-numeric data. For example:
n01Safeway;inc=c(109,110);
+c=c(109,110).in.(1:99)
Where inc= has been used at a higher level (for example, on the tab statement as well as on the element), the increment can be switched off for a single element with the option noinc on the appropriate element.
Where inc= is present at several levels, the rules are as follows:
Position of inc=
Rule
On tab and l
Both increments are applied
On tab and element
inc= on the element overrides inc= on the tab for that element only
On l and element
inc= on the element overrides inc= on the l statement for that element only
On tab, l and element
inc= on the element overrides inc= on the l statement for that element only; inc= on the tab is multiplicative with the l or element inc= as appropriate
For example:
tab ax01 ban01;inc=c10
l ax01;inc=c11
col 29;first;second;third;%inc=c12
The first and second elements are incremented by the values in c10 and c11; the third element is incremented by the values in c10 and c12.
Note inc= can also be used on elements when tables of means, medians, maximum or minimum values are required.
For examples of a table of means and a table of minimum/maximum values of incs, see Sample tables.
inctext=description_text
Can be used with the inc= option to specify a description text for a numeric variable. When a numeric variable appears many times in the program, Quantum only uses the first inctext= associated with the variable. However Quantum issues a warning on the screen and in out1 if the text on subsequent inctext= statements differs from that on the first statement. This test is case-sensitive, so Quantum issues a warning if the first text is ‘Serial number’ and the second is ‘serial number’. If no inctext= is specified for an inc=, Quantum generates a description text that matches the specified name.
If inctext= is specified on a statement with no inc=, it is ignored with a warning message.
inctext= is not valid for elements of grid axes, nor for pre= or post= options on wm statements.
Note You define numeric variables for use in Quanvert databases and for export to SAS or SPSS with the namedinc statement. For information about using namedinc for exports to SAS or SPSS, see Data conversion programs. For information about using namedinc when setting up a Quanvert database, see Preparing a study for Quanvert.
keep[=type]
Tags an element for use in a percentage difference calculation.
For more information, see Percentage differences.
levbase
Increments the base element of an uplev’d axis for all records at the anlev level.
For more information, see uplev and levbase.
maxim
Used with inc= to produce an element that shows the maximum value of the inc= variable. Zero values are ignored.
median
Used with inc= to produce an element that shows the median value of the inc= variable. Zero values are ignored.
minim
Used with inc= to produce an element that shows the maximum value of the inc= variable. Zero values are ignored.
missing=expression
Treats values defined by the logical expression the same as missing values if missing values processing is switched on for the tabulation section.
This option is valid anywhere that inc= is valid, but you usually use it on definitions for statistical elements such as n25s or on n01s that create medians. For example:
n01Median value;inc=c(123,127);median;
+missing=c(123,127).le.0
This calculates a median value by summing up the values in columns 123 to 127. Values that are less than or equal to zero are treated as missing values and are excluded from the calculation if missing values processing is switched on for the tabulation section.
missingval
Exports non-numeric data as missing_. This facility is always available regardless of whether missing values processing is on or off.
When you use Quantum to export data for use with SAS or SPSS, Quantum codes the data according to the position that the element occupies in the axis. For example, in the axis:
l sex
col 110;Base;Male;Female
n01Not answered;c=-
Men are coded as 1, women as 2 and anyone who did not answer is coded as 3. If you want the data to be exported so that respondents in the Not answered element has the value missing_, add the option missingval to the element. For example:
n01Not answered;c=-;missingval
noround
Prevents the cell count for this element being altered when rows or columns are rounded to 100%.
op=A/B
Selects an element for use in a percentage difference calculation.
For more information, see Percentage differences.
rej=n
This is used to exclude records belonging in one row from one or more other rows. The rows from which records are excluded have the option rej=0, and the row which is to be excluded has the option rej=1. For example:
l ax01
n10Base;rej=0
col 238;Brand A;Brand B;BrandC;
n01DK/NA;c=c238n'1/3';rej=1
Here, any respondent in the category ‘DK/NA’ will be excluded from the base row; that is, anyone who does not have a 1, 2 or 3 in column 238.
Note Only one element in an axis can have rej=1 on it.
wm=n
Weights the element using weights in weight matrix n.
For more information, see Using weights.
See also
Options on n, col, val, fld and bit statements