Forms multiple-response factors from free-response data (R.W. Payne).
||Pointer with a factor for each
||Specifies the codes to look for in the
||Strings to label the factors within the
||Defines groupings of duplicate or alternative codes within the
||Whether to exclude the factor recording which
||Suffix to use to represent the null factor in
||Label to use to represent a the null factor in
||Whether the data for the respondents is given line-by-line within the
||Whether to treat the case of letters (small or capital) as significant when searching for the codes (
||Whether to treat differences between multiple spaces and single spaces as significant, or to treat them all like a single space (
||Whether to require each
||Characters to use as separators; default
||Information from the respondents|
Multiple responses occur in surveys as the result of open-ended questions like “Which plants grow in your garden” or “What languages do you speak?”. Results from a multi-response question are represented in Genstat by a pointer containing a factor for each possible response. Each factor has two levels (numbered 0 and 1, and labelled
'present') to indicate where the corresponding response was recorded.
The data for
FFREERESPONSEFACTOR are specified using the
DATA parameter. If option
DATAFORMAT=linebyline (the default), the data are specified in a single text with a line for each respondent. You can also give a second text, again with a line for each respondent, if you cannot fit all the information for any of the respondents into a single line. Likewise you can specify a third text if you need more than two lines, and so on. Alternatively, if option
DATAFORMAT=textbytext, you supply the data for each respondent in a separate text. The information consists of free-form text in which the responses of interest are to be found. For example, in a survey of garden plants, the text might contain the lines
'I grow carrots, cabbages and lettuces. I also have an apple tree.'
The codes to find within the texts are supplied, in a text, by the
RESPONSECODES option. If you want to supply alternative codes (for example, synonyms or singlar and plural codes), you should put all the alternatives into the
RESPONSECODES text, and set the
DUPLICATECODES option to a factor to indicate how the codes are grouped together. For example,
Codes below contains singular and plural codes for various plants, and
Alternatives indicates how these belong together
apples,roses,magnolias,sycamores,'silver birches'] Codes
FACTOR [LEVELS=10; VALUES=(1...5)2,(6...10)2] Alternatives
The pointer of multiple-response factors is saved using the
MRESPONSE option. By default, the pointer is labelled by the names of the codes (or by the first of each set of codes if there are alternatives). However, you can use the
LABELCODES option to supply other labels if these are unsuitable (e.g. too long).
EXCLUDENULL option controls whether or not the pointer contains a factor to make an explicit record of the people that gave none of the codes (default
'no'). This will be needed if the later tables are to contain a line for “no response”. The
SUFFIXNULL option specifies the suffix to be used for this factor in the pointer while, the
LABELNULL option specifies its label.
FFREERESPONSEFACTOR usually ignores the case of letters (small or capital) when looking for the codes. So for example
'Apple' would be the same as
'apple'. However, you can set option
CASE=significant to recognise these differences in case.
FFREERESPONSEFACTOR usually also treats multiple spaces as the same as a single space, but you can set option
MULTISPACE=significant to treat these differences as important.
FFREERESPONSEFACTOR requires each code to begin either at the start of the
DATA text or to be preceded in the text by a separator (such as a space or comma). Similarly, it requires each code to end within the text with a separator (or to be at the end of the text). This is requested by the
DISTINCT option, with its default
DISTINCT=left,right. However, for example, you can set
DISTINCT=left if the codes must be separated from other text only to the left (i.e. at the start), or
DISTINCT=* if they need not be separated at all. The separators are specified by the
FFREERESPONSEFACTOR uses the
TXFIND directive to search for the response codes.
FFREERESPONSEFACTOR ignores any restrictions on the
CAPTION 'FFREERESPONSEFACTOR example'; STYLE=meta TEXT [VALUE='In my garden I grow carrots, cabbages and lettuces.',\ 'Vegetables: potatoes, carrots.',\ 'I just have a square of concrete where I park the car.']\ Data TEXT [VALUES=carrot,cabbage,lettuce,potato,tomato,\ carrots,cabbages,lettuces,potatoes,tomatoes,\ apple,rose,magnolia,sycamore,'silver birch',\ apples,roses,magnolias,sycamores,'silver birches'] Codes FACTOR [LEVELS=10; VALUES=(1...5)2,(6...10)2] Alternatives FFREERESPONSEFACTOR [MRESPONSE=Vegetables; RESPONSECODES=Codes;\ DUPLICATECODES=Alternatives] Data PRINT Vegetables TEXT [VALUE='In my garden I grow carrots, cabbages and lettuces.',\ 'I also have an apple tree, a rose bush and a magnolia tree.']\ Garden & [VALUE='Vegetables: potatoes, carrots.',\ 'Trees: sycamore, silver birch.'] Garden & [VALUE='I just have a square of concrete where I park the car.']\ Garden FFREERESPONSEFACTOR [MRESPONSE=Plant; RESPONSECODES=Codes;\ DUPLICATECODES=Alternatives; DATAFORMAT=textbytext] Garden PRINT Plant