Transform covariates? #12
-
Hi Connor! Related question to the other. In the context of stangeo's Poisson GLM, is it helpful to try and normalize covariates as best as possible? My guess is yes because covariates are inside the eta parameter, which has linear relationship to log(lambda): If it is helpful to transform the covariates, should I also transform the associated error terms in the same way before feeding into |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If you end up transforming the scale of the covariates in any way, then the same change should be made to the SEs. For MCMC sampling, it can help if they're all on a similar scale but that should not be confused with the practice of converting all the covariates to the standard normal scale by dividing by their respective standard deviations. For example, in my opinion, it makes sense, when using demographic percentages as a covariate, to use the scale 0-1 (proportions). You can also use the When using income, for example, it helps to scale the variable down by dividing by 1,000 (this is only about MCMC sampling). So I'd divide both income and the SEs by 1000 before doing anything else, including before using Personally i don't think that covariates need to be or should be put on the same scale (like by turning them all into z-scores), and you can probably find some valid criticisms of that practice out there. |
Beta Was this translation helpful? Give feedback.
If you end up transforming the scale of the covariates in any way, then the same change should be made to the SEs.
For MCMC sampling, it can help if they're all on a similar scale but that should not be confused with the practice of converting all the covariates to the standard normal scale by dividing by their respective standard deviations. For example, in my opinion, it makes sense, when using demographic percentages as a covariate, to use the scale 0-1 (proportions). You can also use the
center_x
argument in the models (e.g.stan_glm
) and that can also improve sampling speed.When using income, for example, it helps to scale the variable down by dividing by 1,000 (this is only about M…