Statalist The Stata Listserver


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

st: RE: Modeling costs using GLM estimation.


From   "Maarten Buis" <M.Buis@fsw.vu.nl>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Modeling costs using GLM estimation.
Date   Wed, 7 Jun 2006 21:13:42 +0200

--- Singhal, Puneet K. wrote:
> I'm modeling costs using -glm- in STATA.  This is how my syntax looks:
> 
> glm cost var1 var2 var3, family(gamma) link(log)
> 
> My primary interest variable is var1 which is a 0/1 dummy variable.  My
> understanding is that the coefficients on the right hand side variables will
> be in logs.  Now, how do I convert these coefficients into actual dollars?
> Meaning, how can I say that var1=1 is so much more (less) in dollars
> compared to var1=0.  Can I also get 95% CI around the mean dollar estimate
> for va1?  

Puneet:
Actually the right hand side is in logs. The easiest way to achieve what you 
want is to type -mfx- after you issued the -glm- command, see the example below.
HTH,
Maarten

*-----------------begin example-------------------
sysuse auto, clear
glm price foreign mpg, family(gamma) link(log)
mfx
 *-------------end example-----------------------

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology 
Vrije Universiteit Amsterdam 
Boelelaan 1081 
1081 HV Amsterdam 
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214 

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of Singhal, Puneet K.
Sent: woensdag 7 juni 2006 21:01
To: 'statalist@hsphsun2.harvard.edu'
Subject: st: Modeling costs using GLM estimation.

Hi,

I'm modeling costs using -glm- in STATA.  This is how my syntax looks:

glm cost var1 var2 var3, family(gamma) link(log)

My primary interest variable is var1 which is a 0/1 dummy variable.  My
understanding is that the coefficients on the right hand side variables will
be in logs.  Now, how do I convert these coefficients into actual dollars?
Meaning, how can I say that var1=1 is so much more (less) in dollars
compared to var1=0.  Can I also get 95% CI around the mean dollar estimate
for va1?  I do not use STATA very often so providing actual syntax will be
of much help.

Thanks.

Puneet




------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message.  If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.
------------------------------------------------------------------------------
*
*   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/

*
*   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/



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