Transform a categorical variable
The response variable is discrete ( it could be binary or multinomial), it could have "k" groups (k=2 binary, k>2 multinomial). the categorical can have "c" categories. The routine finds the weights for each category using the Fisher's method described in
Hubert J. Carl, Wisenbaker M. Joseph, Smith D. Jerry and Smith C. Janet (1986). "Using Categorical Variables in discriminate analysis', Multivariate Behavioral Research, 21:4, 479-496
This routine is useful if you are performing a regression or ANOCOVA or using a GLM but you have many categorical variables and there are many categories that dummy coding them is inefficient. however, the practicality of the algorithm is not known.
Cite As
Soma (2024). Transform a categorical variable (https://www.mathworks.com/matlabcentral/fileexchange/20300-transform-a-categorical-variable), 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.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 | bsd license |