Dear all,
Does anyone know how can the market shares after a mixlogit model, including price, be estimated? For example in the example Hole (2007) used, how can we estimate the market share for a well-known supplier at a given price?
The example of the data set is
And the estimated model is
So after this estimation, how can I estimate the market share for, say, a wknown, or local supplier, assuming all prices were 9 or 7 for example?
I have tried:
However, I only get the 'in sample' predictions, and not out of sample prediction.
I would really appreciate your help.
Best,
Emma
Does anyone know how can the market shares after a mixlogit model, including price, be estimated? For example in the example Hole (2007) used, how can we estimate the market share for a well-known supplier at a given price?
The example of the data set is
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte(y price contract local wknown tod seasonal) int(gid pid) 0 7 5 0 1 0 0 1 1 0 9 1 1 0 0 0 1 1 0 0 0 0 0 0 1 1 1 1 0 5 0 1 1 0 1 1 0 7 0 0 1 0 0 2 1 0 9 5 0 1 0 0 2 1 1 0 1 1 0 1 0 2 1 0 0 5 0 0 0 1 2 1 0 9 5 0 0 0 0 3 1 0 7 1 0 1 0 0 3 1 0 0 0 0 1 1 0 3 1 1 0 0 1 0 0 1 3 1 0 0 1 0 1 0 1 4 1 0 9 1 0 0 0 0 4 1 0 7 0 1 0 0 0 4 1 1 0 5 0 1 1 0 4 1 1 0 0 1 0 1 0 5 1 0 9 1 0 1 0 0 5 1 0 0 0 0 0 0 1 5 1 0 7 5 0 1 0 0 5 1 end
Code:
global randvar "contract local wknown tod seasonal" mixlogit y price, rand($randvar) group(gid) id(pid) nrep(100)
I have tried:
Code:
mixlbeta $randvar if price==9, saving(train) replace nrep(50) // or mixlbeta $randvar if price==7 , saving(train) replace nrep(50)
However, I only get the 'in sample' predictions, and not out of sample prediction.
I would really appreciate your help.
Best,
Emma
Comment