Professional > Interview scripting > Writing interview scripts > Repeated questions > Three-dimensional grids
 
Three-dimensional grids
A three-dimensional grid is a categorical grid in which each cell contains a list of possible responses. You may find this an efficient method of obtaining ratings for subquestions based on two characteristics, where one of the characteristics is common to all subquestions. For example, suppose you have survey that compares a number of insurance companies. You want to obtain ratings for various aspects of each company’s web site. The value in each cell of the grid has three characteristics: company name, aspect to be rated, and rating.
The rating is the component that is supplied by respondents, so that must be the value that is entered into each cell of the grid during interviews. Once you take this out of the requirement, you are left with a standard grid of company name by aspect. The question you want to repeat is “How would you rate the web site for company X for Y?” so the company names become the loop control texts and the aspects to be rated become the response texts. When displayed, the grid looks like this:
Example output for a three-dimensional grid
The general structure of a three-dimensional grid in the metadata section is as follows:
LoopName "
Question text
" loop
{
  Repetition texts
} fields
(
  Qname "" loop
  {
Grid categories
  } fields
  (
    SubQname categorical [1..1]
    {
      Responses
    };
  ) expand;
)
[column|row] expand;
where:
LoopName is the name of the loop.
Question text is the question text.
Repetition texts are the texts to use for each repetition of the question. You can use a shared list here.
Qname is the name of the question that forms the second dimension of the grid (either rows or columns depending on the position of the repetition texts). You can use a shared list here.
Grid categories are the category texts for the second dimension of the grid (either rows or columns depending on the position of the sub-question texts).
SubQname is the name of the sub-question that the respondent answers in each cell of the grid.
Responses is a list of categorical responses from which respondents can choose an answer in each cell of the grid. You can use a shared list here.
Here is the definition for the carrier by service by rating grid:
WebSite "How would you rate each company's web site for the
    following?"
loop
{
use InsuranceCompanies
} fields (
Aspect "" loop
{
Usability "Ease of use",
Information "Provision of information",
Visual "Visual layout/appearance",
Speed "Speed of loading"
} fields (
Rating "Rating" style(control(type="droplist"))
categorical [1..1]
{
NoSelect "Please select"
{
Excellent, VeryGood "Very Good",
Good, Fair, Poor
}
};
) expand;
) expand;
Notice how the list has been set up to prompt the respondent to select a category in each cell. The response list has been defined with a subheading which would normally be displayed with the responses listed below it. However, because only one response can be visible in the cell at a time, the subheading acts as a prompt instead. The fact that the list should be displayed as a list is defined in the routing section, which is as follows:
WebSite[..].Aspect[..].Rating.Style.Control =
    ControlTypes.ctDropList
WebSite.Ask()
WebSite[..].Aspect[..].Rating is a reference to every cell of the grid: WebSite[..] refers to each carrier, Aspect[..] refers to each service, and Rating refers to the ratings, so this part of the statement translates to "For every combination of carrier, service and rating".
Style refers to the display characteristics of each cell, and Control is the keyword for the way the cell is to be displayed. In this example, a list is required so the display control for each cell is set to ControlTypes.ctDropList. Don't worry about having to remember all these words. The routing section has a ScriptAssist facility that displays selection lists of appropriate keywords that change as you type (see Creating your first mrScriptBasic script for details).
The second line of routing instruction simply tells the interviewing program to display the question.
See also
Repeated questions