Question data locations

<< Click to Display Table of Contents >>

Navigation:  User Guide > Project definition > Questions >

Question data locations

Companion

For CSV data only the data location widths and maximum number of answers are used, data locations are not relevant.

If you have a data map, see also Handling raw data, Matching data locations.

This is how data locations are allocated to questions:

Single-coded

This answer is a single selection from a list of responses.

Single-coded responses are normally stored as a number of up to 4 digits to represent the response number selected.

The width is set to 1, 2, 3 or 4.  This width determines the maximum response number, for example a width of 2 can hold up to 99 responses.

Individual response locations

If individual response locations are allocated in the Entry details window then there is no width and each response is allocated its own data location and code.  These are displayed as:

location / code

For example, a response might be allocated to 123/5 which is code 5 in data location 123.

Each data location can store up to 10 or 12 response codes.  The codes are 1234567890 but can be extended to 12345676890XV in Project global settings.  In character data X is "-" and V is "&".

Multi-coded

This also has answers from a list of responses, but in this case more than one response can be given.

Multi-coded questions are usually stored as two or more numbers of up to 4 digits to represent the response numbers selected.

The width is set to 1, 2, 3 or 4.  This width determines the maximum response number, for example a width of 2 can hold up to 99 responses.

The maximum number of answers (repeats) that can be given for any one questionnaire must also be set in the Entry details window.  This is sometimes called a "spread field".

As an example, a multi-coded question with 999 responses (width 3) and a maximum responses of 4 will use 12 consecutive data locations - four 3 digit numbers.  Unused data locations (if less than four responses) are left empty.

If "Fixed response locations" has been set globally then the maximum number of answers must be at least the number of responses excluding "Refused" responses.

Individual response locations

If individual response locations are allocated in the Entry details window there is no width and each response is allocated its own data location and code.  These are displayed as:

location / code

For example, a response might be allocated to 123/5 which is code 5 in data location 123.

In binary data each data location can store up to 10 or 12 response codes.  The codes are 1234567890 but can be extended to 12345676890XV in Project global settings.

In character data only code 1 can be used in each data location, so each response has its own data location shown as:

location / 1

Integer

The answer is a whole number.

A number of data locations (width) are allocated to hold the largest number expected.  For example, a width of 4 will allow any number between -999 and 9999 to be stored.

The maximum data location width is 9 which will store any number between -99999999 and 999999999.  Use float questions for larger numbers.

Float

The answer is any number and may contain a decimal point.

A number of data locations (width) are allocated to hold the largest number expected.

IMPORTANT: the width must allow space for the decimal point and at least one decimal place.  For example, a width of 4 will allow any number between -9.9 and 99.9 to be stored.

You can also set the number of decimal places to store in the data.

The maximum data location width is 20.

Character

The answer is some text.

A number of data locations (width) are allocated to hold the longest text expected.

The maximum data location width is 2000 characters, including spaces.

Note: be reasonable when allocating the width because in a raw data file the records can get very large if large widths are used.

IMPORTANT: if the raw data structure is Multiple lines per questionnaire the answer cannot be broken, so the maximum width is about 70 characters depending on the number of data locations reserved for data structure information (serial and card numbers).

Date

The answer is a date and it is always stored as YYYYMMDD so the width is fixed at 8 data locations.

Time

The answer is a time and it is always stored as HHMMSS so the width is fixed at 6 data locations.

Verbatim

The answer is some text.

For ASC or binary data the answer is not stored in the fixed format data file.

No data locations are allocated.

None

There is no answer

No data locations are allocated.