Indicator matrix generation from survey questions.

indicator matrix, multiple correspondence analysis, crosstabulation analysis, categorical analysis.
1.6K Downloads
Updated 5 Jan 2009

View License

An indicator matrix (G), a binary coding matrix of the factors called dummy variables. The number of rows are the total sample items and the columns are the total categories of the variables. The elements in G are 1's if the item corresponding to the category of the variable or 0's if not. The indicator matrix is an alternative format to input data in a Multiple Correspondence Analysis from survey questions. One can get the Burt matrix (B) simply by B = G'G.

Syntax: function x=indmatgen(lcv,table)

Input:
lcv: maximum number of levels on each catagorical variable
table: table of data

Output:
- Indicator matrix

Cite As

Antonio Trujillo-Ortiz (2025). Indicator matrix generation from survey questions. (https://ch.mathworks.com/matlabcentral/fileexchange/22560-indicator-matrix-generation-from-survey-questions), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Shifting and Sorting Matrices in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.5.0.0

We improved this m-file by the valuable comment of Jos (05/01/2009).

1.3.0.0

Text was improved.

1.1.0.0

It was added an appropriate format to cite this file.

1.0.0.0