Tables and axes > Include and substitution > Filing and retrieving non-identical statements > Symbolic parameters for variables
 
Symbolic parameters for variables
Users are sometimes misled by the col(a) notation into thinking that it is only for substitutions to do with columns. This is not true. You can use col(a) to define symbolic parameters for variables too.
To illustrate this, let’s go back to the product test we used for explaining symbolic parameters for columns. In the example that dealt with product and advertizing awareness we explained how you could use two symbolic parameters on the same line to test whether a product was named first at both the existence and the advertizing questions. To do this you could either use the same parameter with different values:
n01Brand A;c=ca00'1' .and. ca24'1'
or you could use two different parameters:
n01Brand A;c=ca00'1' .and. cb00'1'
An alternative is to create an array of named variables in the edit section that are set to 1 if the respondent mentions the same brand first at both questions. You can then replace the ‘and’ condition on each element with a reference to one variable containing all the information you need.
The program you write is:
int first 3s
ed
t2 = 0
do 10 t1 = 124,126
    t2 = t2+1
    first(t2) = c(t1)'1' .and. c(t1+24)'1'
10 continue
end
tab faware bk01
l faware
ttlSame brand mentioned first for existence and advertising
#include bfil1;col(a)=1
The include file, bfil1, contains the elements of the axis as follows:
n01Brand A;c=first(a00).eq.1
n01Brand B;c=first(a01).eq.1
n01Brand C;c=first(a02).eq.1
At the end of the edit first(1) is set to 1 if the respondent mentioned Brand A first at both the existence and advertising questions. It is set to zero if Brand A was mentioned first at one question only or was not mentioned at all. first(2) and first(3) contain similar information for brands B and C respectively. For more information about do loops, see Loops.
See also
Filing and retrieving non-identical statements