In the GLM Poisson regression example (http://docs.pymc.io/notebooks/GLM-poisson-regression.html?highlight=transform) there is a variable transformation that applies the inverse-link (exp) on the Beta coefficients. Then, the developer comments the effects of the variables. For example he comments “non-zero positive effect of adding alcohol”. Can it be really zero?
Thus, it is not clear why he transform variables to comment the effects: by transforming he can’t event see negative effects (e.g. millions of euro spent in police forces <-> crime counts). Moreover, non of the variables can be zero (event with horseshoe or LASSO). Can you help me understanding the choice?
It is a standard treatment using
exp() to transfer the expectation of a GLM when you have a Poisson response variable (see Link function for GLM). It cannot be zero, as the parameter for Poisson distribution (i.e., lambda) is always larger than zero.
In a regression point of view, you can still have beta coefficient being negative for some predictors, but when you are trying to make a prediction you need to do the
thanks. So, generally speaking, the author should comment the “meaning” of the non-transformed coefficients, shouldn’t he? Because the transformation changes the meaning (and direction) of the Betas
It depends, I prefer to report the transformed coefficients because it is more natural. For example, if I am going to report the differences of two Poisson rates, I usually would compute the differences of the transformed
lambda1 = exp(a) etc. Here
b are reconstructed using linear combinations of the coefficients.
mhh in specific I have to see the factors (e.g unemployment, income) that are positively (or negatively) related to crime. Thus, is there a problem commenting the non-transformed Betas?
You can, but the relationship sometime might not be straightforward - you will end up doing the transformation mentally anyway.
What I usually do (psychology research) is to create some artificial case and compare the transformed rate. For example, say in your case you want to see the relationship between income and crime rate, you can get a prediction of the crime rate at the minimum income and compare it with the prediction of the crime rate at the maximum income.
yes, but in my project I would really like to know wheter variable X2 has negative/positive effect on crime.
However, can you link me some examples of your use in psychology? I would really like to see how you discuss transformed variables thx
In that case, I think you can directly look at the sign of the coefficient - after all the expectation (i.e., crime rate) is still the linear function of X and you can just interpret the coefficient of X2 as is.
Also, you don’t loose any information by doing a
exp transform. “the coefficient is negative” just become “the coefficient is < 1”.