File Exchange

image thumbnail

Conditional Logit

version 1.0.0.0 (3.91 KB) by Jared Ashworth
A conditional logit function that allows restrictions

3 Downloads

Updated 29 Jul 2014

View License

A conditional logit is a form of multinomial logit where the variables are allowed to vary over alternatives. This has functionality similar to Stata's asclogit command.

clogit.m is the function to be submitted to an optimization tool (most notably fminunc). It can be specified to have all, some, or no variables vary over alternatives. It accepts a restriction matrix of the form created by the user-submitted function "Apply Restrictions" (see below).

pclogit.m returns the probabilities based on the parameters estimated by clogit.m

asclogitSim.m is a small example.

Cite As

Jared Ashworth (2021). Conditional Logit (https://www.mathworks.com/matlabcentral/fileexchange/47389-conditional-logit), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

Mika

Thanks for the submission,
I tried to work with this when I have varying number of choices but I could not see how it should b done. Should I simply set the parameters of the remaining choices to NaN?
Thanks

Alamgir Naushad

SAd

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags
Acknowledgements

Inspired by: Apply Restrictions

Community Treasure Hunt

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

Start Hunting!