2
$\begingroup$

Namely, what is the calculation for determining the unstandardized (metric) intercept?

In my situation, all of the variables were standardized including the independent variable.

Therefore the formulas given in this post do not apply: How to convert standardized coefficients to unstandardized coefficients?

Rather the formulas given in this link (Standardized Coefficients) do. Specifically, this one:

B' = B * Sx / Sy

Where B' is the standardized coefficients. So the reverse of that is:

B = B' * Sy / Sx

I confirmed that do be the case.

set.seed(1)
d=data.frame(y=1:100,x1=runif(100)+10,x2=rnorm(100)+10)
d$y=1+ 2 * d$x1 + 3*d$x2 ##easy coef 1 2 3
d0=d
m=lm(y~.,d0)
coef(m) #are 1 2 3
d=as.data.frame(scale(d))
m=lm(y~.,d)
coef(m) #now: -1.575657e-17  1.834809e-01  9.668451e-01
coef(m)['x1']*sd(d0$y)/sd(d0[['x1']]) #nicely back to 2
coef(m)['x2']*sd(d0$y)/sd(d0[['x2']]) #nicely back to 3

However, what is the equation to determine the metric intercept?

$\endgroup$

1 Answer 1

3
$\begingroup$

If we write the regression equation like so:

$y = B x + C$

But if both sides are standardized, then we have:

$\dfrac{y - \bar y}{\sigma_y} = B \dfrac{x - \bar x}{\sigma_x} + C$

Now solving for $y$ by multiplying by $\sigma_y$ then adding $\bar y$:

$y = B \dfrac{x - \bar x}{\sigma_x} \sigma_y + C \sigma_y + \bar y$

$y = B \dfrac{\sigma_y}{\sigma_x} x - B \dfrac{\sigma_y}{\sigma_x} \bar x + C \sigma_y + \bar y$

Therefore the metric coefficients are:

$B' = B \dfrac{\sigma_y}{\sigma_x}$

$C' = B \dfrac{\sigma_y}{\sigma_x} \bar x + C \sigma_y + \bar y$

In the above notation, the multiplication operator is implied.

R test code:

coef(m)[1]*sd(d0$y)+mean(d0$y)-  
  (coef(m)['x1']*sd(d0$y)*mean(d0[['x1']])/sd(d0[['x1']]) +
   coef(m)['x2']*sd(d0$y)*mean(d0[['x2']])/sd(d0[['x2']]))

Gives 1 as desired.

$\endgroup$
1
  • $\begingroup$ I would amend this slightly. It is a well-known result that the constant disappears if both $x$ and $y$ are standarised. You could therefore simply get rid of the $C$ from the second equation and following, thus simplifying your final expression for $C'$. $\endgroup$
    – Anthony
    Commented May 21, 2021 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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