Shawn Morrison
2010-Jan-15 21:50 UTC
[R] Interpreting Poisson GLM coefficients into everyday language
Is there a readily available function to calculate the effect of variables from a poisson GLM on the response variable? My situation is as follows: I have developed a poisson GLM model and have obtained the coefficients, SEs, etc However, I am somewhat stuck on interpreting a coefficient in everyday language. For example: Y = dependent variable (count data) A = independent variable (continuous) B = independent variable (continuous) The hypothetical regression equation is: Y ~ constant + 0.25*A - 0.19*(log(B+1)) [I used natural logs for A] I want to be able to say that changing B by one unit has a corresponding ___% decrease in Y. How do I calculate the % change in Y caused by changes in B? Is there an R function, or a bit of code that will do the trick? How do these calculations affect the SEs? Thank you, *************** Shawn Morrison Edmonton, Alberta
David Winsemius
2010-Jan-16 02:25 UTC
[R] Interpreting Poisson GLM coefficients into everyday language
On Jan 15, 2010, at 4:50 PM, Shawn Morrison wrote:> Is there a readily available function to calculate the effect of > variables from a poisson GLM on the response variable? > > My situation is as follows: > > I have developed a poisson GLM model and have obtained the > coefficients, SEs, etc However, I am somewhat stuck on interpreting > a coefficient in everyday language. > For example: > > Y = dependent variable (count data) > A = independent variable (continuous) > B = independent variable (continuous) > > > The hypothetical regression equation is: > > [I used natural logs for A]Assuming that -0.19 was an estimated coefficient in a glm model specified with a formula of: Y ~ A + log(B+1) , then you most likely got a model fit with a log link (the default for Poisson models) in addition to the log transform you applied . So you may have unnecessarily used log transforms. Then the expected value of Y|log(B+1) for E(Y|log(B+1)=1), would be exp(-0.19) times that of E(Y|log(B+1)=0). You may have confused things a bit by using log(B+1). a) Did you have zero values for B? b) Was there really a need to transform A and B in that manner? You ended up with a log(log()) transform.> > I want to be able to say that changing B by one unit has a > corresponding ___% decrease in Y. > > How do I calculate the % change in Y caused by changes in B? Is > there an R function, or a bit of code that will do the trick? How do > these calculations affect the SEs? > > Thank you, >> and provide commented, minimal, self-contained, reproducible code.^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Code. We want code. -- David Winsemius, MD Heritage Laboratories West Hartford, CT