0
$\begingroup$

As I understand it, for a regression model, centering the variables around their means can be helpful since it makes the intercept term the expected value of $Y_i$ when the predictor variables are set to their means. So let's say I do a regression using centered variables and obtain coefficients $\beta_i$ and an intercept $\alpha$. If I wished to do prediction on out-of-sample data, can I directly use these coefficients or do I need to use coefficients obtained from running a regression on non-centered data? Thanks!

$\endgroup$
3
$\begingroup$

The coefficients from centered and non-centered data will be identical, so you can use the same coefficients. However, the intercept will be different, so you will need to center the new observations around the old center.

That is, if you fit a regression with the predictor $X' = X - \bar X$, where $\bar X$ is the mean of the sample you used to fit the regression (aka the "training sample"), you need to subtract the old $\bar X$ from new observations before making predictions.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.