Forms multiple-response factors from free-response data (R.W. Payne).
Options
MRESPONSE = pointer |
Pointer with a factor for each RESPONSECODE , indicating which of the DATA texts contain that response |
---|---|
RESPONSECODES = text |
Specifies the codes to look for in the DATA texts |
LABELCODES = text |
Strings to label the factors within the MRESPONSE pointer; default RESPONSECODES |
DUPLICATECODES = factor |
Defines groupings of duplicate or alternative codes within the RESPONSECODES text |
EXCLUDENULL = string token |
Whether to exclude the factor recording which DATA contain none of the RESPONSECODES (yes , no ); default no |
SUFFIXNULL = scalars |
Suffix to use to represent the null factor in MRESPONSE ; default 0 |
LABELNULL = text |
Label to use to represent a the null factor in MRESPONSE ; default 'none' |
DATAFORMAT = string token |
Whether the data for the respondents is given line-by-line within the DATA text(s) or whether there is a separate text for each respondent (linebyline , textbytext ); default line |
CASE = string token |
Whether to treat the case of letters (small or capital) as significant when searching for the codes (significant , ignored ); default igno |
MULTISPACES = string token |
Whether to treat differences between multiple spaces and single spaces as significant, or to treat them all like a single space (significant , ignored ); default igno |
DISTINCT = string tokens |
Whether to require each RESPONSECODE to have one or more separators to its left or right within each DATA text (left , right ); default left , righ |
SEPARATOR = text |
Characters to use as separators; default ' ,;:.' |
Parameter
DATA = texts |
Information from the respondents |
---|
Description
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 'absent'
and '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
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
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).
The 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.
By default, 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 SEPARATOR
option.
Options: MRESPONSE
, RESPONSECODES
, LABELCODES
, DUPLICATECODES
, EXCLUDENULL
, SUFFIXNULL
, LABELNULL
, DATAFORMAT
, CASE
, MULTISPACES
, DISTINCT
, SEPARATOR
.
Parameter: DATA
.
Method
FFREERESPONSEFACTOR
uses the TXFIND
directive to search for the response codes.
Action with RESTRICT
FFREERESPONSEFACTOR
ignores any restrictions on the DATA
texts.
See also
Procedures: FMFACTORS
, MTABULATE
.
Commands for: Calculations and manipulation, Survey analysis.
Example
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[1] & [VALUE='Vegetables: potatoes, carrots.',\ 'Trees: sycamore, silver birch.'] Garden[2] & [VALUE='I just have a square of concrete where I park the car.']\ Garden[3] FFREERESPONSEFACTOR [MRESPONSE=Plant; RESPONSECODES=Codes;\ DUPLICATECODES=Alternatives; DATAFORMAT=textbytext] Garden[] PRINT Plant[]