Thursday 15 May 2014

Multinomial Logit Choice Model in R with mnlogit() -



Multinomial Logit Choice Model in R with mnlogit() -

i have question regarding mnlogit bundle in r i'll inquire on stackoverflow it's related specific language , library, won't offended if decides move cross validated (it hard selection of stackexchange site appropriate).

i'm trying create sure understand how works, since documentation isn't detailed, see confusing/conflicting blog entries on package, , because it's been couple of years since i've dealt selection models.

the illustration usage of mnlogit follows:

> require(mnlogit) > data(fish) > head(fish) mode income alt cost grab chid 1.beach false 7083.332 beach 157.930 0.0678 1 1.boat false 7083.332 boat 157.930 0.2601 1 1.charter true 7083.332 charter 182.930 0.5391 1 1.pier false 7083.332 pier 157.930 0.0503 1 2.beach false 1250.000 beach 15.114 0.1049 2 2.boat false 1250.000 boat 10.534 0.1574 2 > fm <- formula(mode ~ cost | income | catch) > result <- mnlogit(fm, fish, "alt", ncores = 2)

what find confusing mode , alt. would've thought dependent variable multinomial choice, appears alt (beach, boat, charter, or pier).

instead it's logical variable, mode. what's mode?

to seek clarify understand read r-bloggers article on topic. made things more confusing repeating fish example, preamble describing dataset in way:

a info frame containing :

mode - selection set: beach, pier, boat, , charter cost - cost mode individual grab - fish grab rate mode individual income - monthly income of individual decision-maker chid - decision maker id

it describes mode if alt not mention alt. can explain me?

if mode did take on discrete selection values described in r-bloggers article, model formula(mode ~ cost | income | catch) create sense me... mode logical variable, thoroughly confused.

oh, okay. think see -- mode indicates of 4 possible choices chosen, given characteristics of each selection set. makes sense.

r choice mlogit

No comments:

Post a Comment