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
引用格式
Antonio Trujillo-Ortiz (2024). Indicator matrix generation from survey questions. (https://www.mathworks.com/matlabcentral/fileexchange/22560-indicator-matrix-generation-from-survey-questions), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!