Professional > Interview scripting > Writing interview scripts > Keywords for data analysis > Special characters in axis blocks
 
Special characters in axis blocks
Axis blocks are an easy way of specifying the elements you want to see in tables for a particular question. In categorical questions, the axis block lists or references responses that appear in the main response list as well as defining additional elements such as statistics and totals that apply only when the question is used in tables.
The specifications you write in an axis block look similar to interview scripting statements, but they are in fact statements in the table scripting language. This means that you can take advantage of some other features of the table scripting language when writing axis blocks. These features provide shortcuts for referring to responses in the main list, as well as allowing to omit responses that apply only to interviews.
Type
To
..
Refer to all responses in the main response list.
Name..
Refer to a range of responses starting with the response named Name and continuing to the end of the response list.
..Name
Refer to a range of responses starting at the top of the list and ending at the named response.
Name1..Name2
Refer to all responses between Name1 and Name2 inclusive.
^Name
Omit the named response from analyses.
In the following example, the “Not answered” response is omitted from analyses. The first line of the axis block refers to all responses from the start of the list up to and including Widowed. The second line indicates that “Not answered” should be ignored:
Mstat "Are you ..." categorical [1..1]
{
Single, Married,
Cohabit "Living with partner",
Divorced, Widowed,
MstatNA "Not answered" na
}
axis (
"{
..,
^MstatNA
}"
);
See also
Keywords for data analysis