Transform a categorical variable

Version 1.0.0.0 (1.67 KB) by Soma
this stand-alone transforms a categorical variable into a quantitative variable using Fishers method
924 Downloads
Updated 31 Mar 2016

View License

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
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Data Type Conversion 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.0.0.0

bsd license