Indicator matrix generation from survey questions.
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
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
