[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
Maarten buis <maartenbuis@yahoo.co.uk> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: RE: RE: out-of-sample predictions with GLM |

Date |
Thu, 26 Jul 2007 15:30:41 +0100 (BST) |

--- jc1926@gmx.de wrote: > In my case, my unit of observation is the share of a new car model as > a percent of the total market for new cars in a given year. I have > this share over several years. Because there are hundreds of car > models in my data, I don't think it would be feasible to use a > multinomial logit. None of my observation are zero or one. The x's > are mostly car attributes for the particular car models, many of > which change over time. > > I pool all the data and estimate with: > glm share_i_year_t x_i_t, fam(binomial) link(logit) robust > > Company dummies are included as fixed effects. The predicted shares > from the model sum to 1 for a given year, which is gratifying. > Out-of-sample predictions do not sum to one, which is not gratifying > but also not unexpected. Maarten's comment makes me wonder if there > is a better approach. The constraint that the proportions add up to 1 in a given year is true in your data (if you have all models (or a model "other") as is apperently true in your case). This constraint is however not enforced in your model. The fact that when you add the predicted proportions up you get a number close to 1 is primarily the result of your data and is certainly not a characteristic of your model. With a fractional mlogit model you could enforce that constaint, though I agree with you that in your case that is probably unpractical. A different remark is that you are ignoring the panel structure of your data. The panel equivalent of -glm- with the -robust- option is -xtgee-. So you might try: xtgee share_i_year x_i_t, fam(binomial) link(logit) i(model) t(year) (assuming that the variable indicating the model is called model, and the variable indicating the year is called year.) Hope this helps, Maarten ----------------------------------------- Maarten L. Buis Department of Social Research Methodology Vrije Universiteit Amsterdam Boelelaan 1081 1081 HV Amsterdam The Netherlands visiting address: Buitenveldertselaan 3 (Metropolitan), room Z434 +31 20 5986715 http://home.fsw.vu.nl/m.buis/ ----------------------------------------- ___________________________________________________________ Yahoo! Answers - Got a question? Someone out there knows the answer. Try it now. http://uk.answers.yahoo.com/ * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**Re: st: RE: RE: out-of-sample predictions with GLM***From:*jc1926@gmx.de

- Prev by Date:
**Re: st: RE: RE: out-of-sample predictions with GLM** - Next by Date:
**Re: st: RE: Question on xthtaylor** - Previous by thread:
**Re: st: RE: RE: out-of-sample predictions with GLM** - Next by thread:
**st: Stata10 SE and do files editor** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |