1. Home
  2. MTABULATE procedure

MTABULATE procedure

Forms tables classified by multiple-response factors (R.W. Payne).

Options

PRINT = string token Controls printed output (counts, totals, nobservations, means, minima, maxima, variances, quantiles, sds, skewness, kurtosis, semeans, seskewness, sekurtosis); default * i.e. none
CLASSIFICATION = factors Non multiple-response factors classifying the tables
MRESPONSE = pointers Pointers to factors defining the multiple-responses for the tables
MRFACTOR = identifiers Identifier of factors to index the sets of multiple responses in the tables
COUNTS = table Saves a table counting the number of units with each factor combination; default *
MARGINS = string token Whether the tables should be given margins (yes, no); default no
WEIGHTS = variate Weights to be used in the tabulations; default * indicates that all units have weight 1
PERCENTQUANTILES = scalar or variate Percentages for which quantiles are required; default 50 i.e. median

Parameters

DATA = variates Data values to be tabulated
TOTALS = tables Tables to contain totals
NOBSERVATIONS = tables Tables containing the numbers of non-missing values in each cell
MEANS = tables Tables of means
MINIMA = tables Tables of minimum values in each cell
MAXIMA = tables Tables of maximum values in each cell
VARIANCES = tables Tables of cell variances
QUANTILES = tables or pointers Table to contain quantiles at a single PERCENTQUANTILE, or pointer of pointers to tables for several PERCENTQUANTILES
SDS = tables Tables of standard deviations
SKEWNESS = tables Tables of skewness coefficients
KURTOSIS = tables Tables of kurtosis coefficients
SEMEANS = tables Tables of standard errors of means
SESKEWNESS = tables Tables of skewness coefficients
SEKURTOSIS = tables Tables of kurtosis coefficients

Description

Multiple responses occur in surveys as the result of open-ended questions like “Which cities have you visited?”. In Genstat, these can be formed by the FMFACTORS procedure and are represented by a pointer containing a factor for each possible response code. The factors have levels 0 and 1, and corresponding labels 'absent' and 'present'. If the original response codes were textual, the various strings are used as labels of the pointer; while if they were numerical, the numbers are used as the pointer suffixes.

The multiple responses for the tables are specified by the MRESPONSE option, while any ordinary factors are specified by the CLASSIFICATION option. The MARGINS option indicates whether or not the tables are to contain margins. For the multiple responses, these represent summaries not over the responses but over the respondents (who may each have given several responses). MTABULATE needs to generate an ordinary factor to classify the dimension of the tables corresponding to each set of multiple responses. You can supply identifiers for these factors (thus allowing them to be accessed outside the procedure), using the MRFACTOR option.

The other options and parameters are similar to those of the TABULATE directive. The COUNTS option can save a table containing the frequencies of the various responses. The DATA parameter provides information about the respondents who made the multiple responses. (So, for example, you could set DATA to the incomes of the respondents and then tabulate the average incomes of the people who have visited each of the cities.) The other parameters allow you to save the various types of numerical summary: totals, numbers of non-missing values, means, minima, maxima, variances, quantiles, standard deviations, skewness and kurtosis coefficients and (within-cell) standard errors of means, skewness and kurtosis.

The PERCENTQUANTILES option specifies which quantiles you want. By default just the median (the 50% quantile) is produced. However, you can set PERCENTQUANTILES to a scalar to request another percentage point, or to a variate to request several. The QUANTILE parameter will then return a pointer with length equal to the required number of quantiles, instead of a single table.

The PRINT option allows you to print the tables (as well as, or instead of, saving them). By default nothing is printed.

Options: PRINT, CLASSIFICATION, MRESPONSE, MRFACTOR, COUNTS, MARGINS, WEIGHTS, PERCENTQUANTILES, SDS, SKEWNESS, KURTOSIS, SEMEANS, SESKEWNESS, SEKURTOSIS.

Parameters: DATA, TOTALS, NOBSERVATIONS, MEANS, MINIMA, MAXIMA, VARIANCES, QUANTILES.

Method

MTABULATE uses TABULATE to form tables for each multiple response or combination of multiple responses, and then EQUATE to put them all into a single table.

Action with RESTRICT

MTABULATE takes account of any restrictions on the classification or multiple-response factors or the DATA or WEIGHT variates.

See also

Directives: TABULATE.

Procedures: FMFACTORS, FFREERESPONSEFACTOR, SVTABULATE.

Commands for: Survey analysis.

Example

CAPTION 'MTABULATE example','Analyse passenger survey.'; STYLE=meta,plain
FACTOR  [LABELS=!t(male,female)] sex
TEXT    nationality,citycode[1...5],languagecode[1...5]
READ    [PRINT=errors] nationality,age,sex,citycode[1...5],\
        languagecode[1...5]; FREPRESENTATION=labels
British 26 male Amsterdam Berlin '-' '-' '-' English French German '-' '-'
British 52 male Barcelona Lisbon Geneva Capetown Helsinki
  English French German '-' '-'
British 48 female Barcelona Lisbon '-' '-' '-' English French '-' '-' '-'
British 16 female Barcelona Brussels '-' '-' '-' English French '-' '-' '-'
British 21 male Athens Dublin '-' '-' '-' English French '-' '-' '-'
British 32 male Paris Capetown '-' '-' '-' English '-' '-' '-' '-'
British 31 female 'Paris' '-' '-' '-' '-' English Japanese '-' '-' '-'
British 40 male Paris Barcelona '-' '-' '-' English '-' '-' '-' '-'
British 38 female Paris Barcelona '-' '-' '-' English '-' '-' '-' '-'
British 51 male Copenhagen Madrid '-' '-' '-' English Spanish French '-' '-'
British 50 female Copenhagen Madrid '-' '-' '-' English Spanish French '-' '-'
British 17 male Dublin '-' '-' '-' '-' English French '-' '-' '-'
British 21 female Paris '-' '-' '-' '-' English French '-' '-' '-'
Dutch 25 male Paris '-' '-' '-' '-' Dutch English French '-' '-'
Dutch 34 male Rome Florence Madrid Brussels '-'
  Dutch English French Italian Spanish
Dutch 33 female Rome Florence Madrid '-' '-' Dutch English German '-' '-'
Dutch 50 male London '-' '-' '-' '-' Dutch English '-' '-' '-'
Dutch 48 female London '-' '-' '-' '-' Dutch English '-' '-' '-'
Dutch 26 male London Brussels Luxembourg Frankfurt '-'
  Dutch English German French '-'
French 37 female London Oxford '-' '-' '-' French English '-' '-' '-'
French 39 male London Oxford '-' '-' '-' French English '-' '-' '-'
French 48 male Amsterdam '-' '-' '-' '-' French '-' '-' '-' '-'
French 34 female Edinburgh '-' '-' '-' '-' French English '-' '-' '-'
French 34 female Edinburgh '-' '-' '-' '-' French English '-' '-' '-'
French 26 male London Copenhagen '-' '-' '-' French English German '-' '-'
French 24 female London Copenhagen '-' '-' '-' French English '-' '-' '-'
French 44 male Berlin '-' '-' '-' '-' French German '-' '-' '-'
French 43 female Berlin '-' '-' '-' '-' French German '-' '-' '-'
German 59 male London '-' '-' '-' '-' German English '-' '-' '-'
German 57 female London '-' '-' '-' '-' German '-' '-' '-' '-'
German 24 female Paris Brussels '-' '-' '-' German English French '-' '-'
German 21 male Paris '-' '-' '-' '-' German English '-' '-' '-'
German 45 male London Brussels Luxembourg Frankfurt Madrid
  German English French '-' '-'
German 37 female London Amsterdam '-' '-' '-' German English '-' '-' '-'
German 81 female '-' '-' '-' '-' '-' German '-' '-' '-' '-'
Swiss 45 male Rome Florence Pisa '-' '-' French German Italian English '-'
Swiss 37 male Edinburgh London '-' '-' '-' French German English '-' '-'
Swiss 41 female Seville Paris '-' '-' '-' French German '-' '-' '-'
Swiss 32 male Venice Florence Rome Brussels Luxembourg
  German French '-' '-' '-'
Swiss 29 female Venice Florence Rome '-' '-' German French English '-' '-' :
GROUPS    [REDEFINE=yes] nationality
FMFACTORS [MRESPONSE=city; RESPONSECODES=cities; CODENULL='-'] citycode[]
FMFACTORS [MRESPONSE=language; RESPONSECODES=languages; CODENULL='-';\
          EXCLUDENULL=yes] languagecode[]
MTABULATE [PRINT=counts; CLASSIFICATION=nationality; MRESPONSE=city]
MTABULATE [PRINT=mean; CLASSIFICATION=sex,nationality;\
          MRESPONSE=language; MRFACTOR=Language] age
Updated on June 19, 2019

Was this article helpful?