Professional > Interview scripting > Writing interview scripts > Keywords for data analysis > Analysis-only elements
 
Analysis-only elements
If there are some elements that you want in analyses but not in interviews, do one of the following.
Create an axis block for the question and define the analysis-only elements in that block but not in the main body of the response list. For example:
HasPets "Do you have any pets?" categorical [1..1]
{Yes, No};
Pets "What pets do you have?" categorical [1..]
{
Rabbit, Cat, Dog, Fish, Bird, Other
}
axis (
"{
..Other,
NoPets 'Does not have pets' expression('HasPets={No}')
}"
);
Define the element in the main body of the response list and add elementtype(AnalysisCategory) to its definition. For example:
ChildAtHome "Do you have children living at home?" categorical [1..1]
{Yes, No};
ChildAge "What ages are those children?" categorical [1..]
{
ChildU5 "Under 5 years",
Child5To11 "Aged 5 to 11",
Child12To15 "Aged 12 to 15",
Child16To18 "Aged 16 to 18",
ChildO18 "Older than 18 years",
NoChildren "No children at home" elementtype(AnalysisCategory)
expression("ChildAtHome={No}")
};
As shown in both examples, you'll usually need to define some sort of expression that specifies who to include in the element. See Combining categorical responses in analyses and Analysis options in shared lists for examples.
See also
Keywords for data analysis