easystats / easystats/datawizard

standardize with refit without centering

Open
#164 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Low priority 😴
Dominant language
R
Stars
238
Forks
18
Avg merge
1d 15h
Merged PRs (30d)
4

Description

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):

  1. subtracting the mean of each input variable and dividing by its standard deviation. (Strictly
    speaking, subtracting the mean is not necessary, but this step allows main effects to be more
    easily interpreted in the presence of interactions.)

We also center each input variable to have a mean of zero so that interactions are more
interpretable. Again, in some applications it can make sense for variables to be centered around
some particular baseline value, but we believe our automatic procedure is better than the current
default of using whatever value happens to be zero on the scale of the data, which all too commonly
results in absurdities such as age = 0 years or party identification = 0 on a 1–7 scale.

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the standardize function and its refit method, focusing on how centering and scaling are currently applied. Check the existing documentation for standardize and the refit behavior, then define and verify an option that scales without centering while preserving the current default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.