MMEmaxlikelihoodsoln

# MMEmaxlikelihoodsoln - © 2011 Steven Tschantz...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: © 2011 - Steven Tschantz Maximum-likelihood estimation Steven Tschantz 3/22/11 Exercises Complete the following exercises. You can save a copy of this notebook, delete the material above, insert and evaluate your commands computing answers below, save your results, and email your final version to [email protected] Use maximum-likelihood to estimate a logit demand model for three products from the following individual choice data for specific prices. Here the i-th element of data is a 4-tuple, the first three entries being the prices of three products, and the last being an integer j in the range 1 to 3 if the consumer picks product j and j = 4 if the consumer chooses no purchase. The parameters of the model are eta1, eta2, eta3, and lambda. The probability of the consumer choosing j = 1 is e I eta1- p1 M lambda e I eta1- p1 M lambda + e I eta2- p2 M lambda + e I eta3- p3 M lambda + e I eta4- p4 M lambda where eta4=p4=0, and similarly for other j . In[1]:= Clear @ eta1, eta2, eta3, lambda, p1, p2, p3 D ; Here is how the data was generated. eta1true = 10.; eta2true = 11.; eta3true = 13.; lambdatrue = 0.5; etalist = 8 eta1true, eta2true, eta3true, 0 < ; pricelist = 8 p1, p2, p3, 0 < ; pricemin = 8.; pricemax = 16.; randompricelist : = Append @ Table @ ToExpression @ ToString @ Round @ RandomReal @ UniformDistribution @8 pricemin, pricemax <DD , 0.01 DDD , 8 3 <D , 0 D ; randomchoice @ pvector_ D : = RandomChoice @ Total @ D & @ Exp @H etalist- pvector L lambdatrue DD fi Range @ 4 DD ; Table @ Append @ Drop @ ,- 1 D , randomchoice @ DD & @ randompricelist D , 8 200 <D 88 11.23, 14.37, 8.33, 3 < , 8 13.33, 9.32, 8.4, 3 < , 8 11.52, 10., 8.81, 3 < , 8 11.42, 15.71, 10.74, 4 < , 8 11.18, 10.41, 12.91, 3 < , 8 8.26, 14.16, 11.12, 1 < , 8 11.94, 8.06, 11.77, 2 < , 8 8.75, 9.95, 13.97, 1 < , 8 15.94, 9.49, 10.27, 3 < , 8 9.68, 14.97, 15.01, 4 < , 8 10.8, 12.53, 11.48, 4 < , 8 14.26, 14.88, 10.66, 3 < , 8 10.87, 12.52, 15.1, 4 < , 8 10.46, 14.63, 8.59, 3 < , 8 14.45, 14.11, 12.23, 4 < , 8 13.99, 14.74, 13.16, 4 < , 8 12.03, 9.22, 11.07, 3 < , 8 8.57, 13.57, 12.49, 1 < , 8 13.4, 14.49, 13.5, 4 < , 8 12.03, 13.8, 10.22, 3 < , 8 8.94, 11.14, 14.81, 1 < , 8 11.08, 10.96, 9.32, 3 < , 8 13.99, 13.25, 10.55, 3 < , 8 14.08, 11.45, 11.17, 3 < , 8 14.61, 11.08, 8.21, 3 < , 8 14.67, 8.6, 9.92, 2 < , 8 13.28, 12.36, 12.44, 3 < , 8 12.31, 14.25, 9.97, 3 < , 8 12.81, 10.64, 14.97, 3 < , 8 9.07, 11.4, 11.19, 1 < , 8 11.79, 14.23, 12.99, 4 < , 8 8.77, 15.43, 15.47, 1 < , 8 12.24, 9.23, 12.84, 2 < , 8 11.88, 15.45, 9.76, 3 < , 8 10.52, 9.2, 11.03, 3 < , 8 8.61, 14.93, 11.67, 3 < , 8 11.09, 11.51, 13.45, 3 < , 8 13.65, 8.71, 10.26, 3 < , 8 9.81, 14.25, 15.18, 1 < , 8 15.17, 10.16, 11.21, 3 < , 8 12.17, 15.98, 13.98, 4 < , 8 11.79, 15.57, 12.06, 1 < , 8 11.38, 15.53, 13.93, 4 < , 8 12.15, 8.72, 12.91, 2 < , 8 13.69, 13.62, 8.99, 3 < , 8 9.32, 11.96, 13.26, 1 < , 8 10.32, 12.15, 10.62, 3 < , 8 9.54, 11.28, 15.01, 4 < , 8 14.28, 11.07, 8.31, 3 < , 8 13.21, 11.92, 13.61, 413....
View Full Document

{[ snackBarMessage ]}

### Page1 / 13

MMEmaxlikelihoodsoln - © 2011 Steven Tschantz...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online