-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
standardize with refit without centering #164
Comments
Do you have an example (reprex) --without an interaction-- where centering vs non-centering changes the signs on the coefficients (other than the intercept)? It really shouldn't... |
Maybe standardizing the data before fitting the model can help, you have options to control the reference for centering and dispersion: https://easystats.github.io/datawizard/reference/standardize.html |
@mattansb It is a two way interactions that display change of sign, it happens where the predictors log2 ratio over temporal data, i.e. log2(x1/x0). I have not so much time right now to reproduce this but it took me a long time to figure out why the results would change. @strengejacke I agree. I was thinking about an option in compare_models() function that I was using a bit too automatically. It is just that this discrepancy made me realize that I should really think about I am doing when standardizing variables. As highlighted in my first post, centering is may be misleading in some cases. To elaborate a bit, when standardizing coefficients, we think about the formula : It is not a big deal, but I wanted to raise this issue, to see if a sentence could be added to the documentation of compare_models(), or an option to specify if variables should be center or not, or at least add a ref to Gelman regarding the difference between scaling and centering/scaling. This said, thank you again for your great package. |
Indeed, if there is an interaction, the simple slopes will change after centering - this is usually something people want (to have the simple slopes represent "main effects"). As @strengejacke pointed out, if you want more fine-grain control, you can standardize each variable as you see fit manually, prior to model fitting. Seeing how the back-end function ( |
Well @mattansb , I agree with you in the case where the 0 values of your predictive variable give little insight as age in the epidemiological study on adult population. Here again, I quote Gelman (2008):
That is fine that is low priority! At least, people who have questions about centering/scaling may end up here and read Gelman (2008). Thank you so much! |
@alaindanet I am aware of these points, even though their application is less commonly used - yes, ideally people would understand their scales and units of measure and would center (or not) variables around sensible values that are derived from domain specific knowledge. |
Thank you so much for the package!
I would like to know if it is possible to provide an option of standardization without centering when using refit method.
The rationale is that the negative and positive values of some predictive variables can have a meaningful signification (i.e. difference of price over a period), and it that case, it is valuable to only scale the variable and not center them as suggested by Andrew Gelman here and here (Gelman, 2008; actually cited in the documentation of the standardize function):
In the case where negative and positive values of predictor variables have different meaning, I believe that the centering can change the meaning of the regression coefficients.
I realized that with my own data analysis where a positive coefficient become negative with centering, with the type of explicative variable that I mentionned above.
The text was updated successfully, but these errors were encountered: