[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: how to access e(b) and e(V) |

Date |
Tue, 20 Oct 2009 04:36:59 -0700 (PDT) |

--- On Tue, 20/10/09, Philomela@gmx.net <Philomela@gmx.net> wrote: > Actually i would like to come up with a linear demand > function like that: > Consumption= constant+ beta_1*Price+beta_2*Income+ ... > and a loglog demand function. > I used the spreadheet programm and manually calculated > Consumption for various prices and got the two demand > functions from that, but unfortunatly, due to the log > transformation i have the following problem: > exp(E(ln(Consumption))) is not equal to E(Consumption). > I thought more precise estimates would help-but as it > turned out now- they don't. > So, can I estimate the consumption for different > prices directly in Stata to get the demand functions? > Then, I should be able to deal with the retransformation > bias as suggested in > Cameron&Trivedi(2009):Microeconometrics using Stata. You have two options: 1) Use -glm- with a log link function, and after that you can just use -predict- to get the predicted values. So you would type something like: glm consumption price income ... , link(log) predict consumptionhat, mu 2) Alternatively the method proposed by Cameron & Trivendi is implemented in Stata by Kit Baum as the -levpredict- package. You can install that by typing in Stata: -ssc install levpredict-. IMHO the -glm- solution is more elegant as it tackles the problem at its root: In this case -glm- models log(E(consumption)) while -regress- models E(log(consumption)). Because of this the exponentiating the left hand side and right hand side after a -glm- model (which happens when you use -predict-, -adjust-, or specify the -eform- option) will lead to results in the original unit of consumption, where this is not true after -regress-. The solution offered by Cameron & Trivendi seems to me a bit of a post hoc solution. -- Maarten -------------------------- Maarten L. Buis Institut fuer Soziologie Universitaet Tuebingen Wilhelmstrasse 36 72074 Tuebingen Germany http://www.maartenbuis.nl -------------------------- Send instant messages to your online friends http://uk.messenger.yahoo.com * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: how to access e(b) and e(V)***From:*Philomela@gmx.net

**References**:**Re: st: how to access e(b) and e(V)***From:*Philomela@gmx.net

- Prev by Date:
**st: AW: RE: combination foreach forvalues** - Next by Date:
**Re: st: orthogonal pairing of observations** - Previous by thread:
**RE: st: how to access e(b) and e(V)** - Next by thread:
**Re: st: how to access e(b) and e(V)** - Index(es):

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