How to get standardized coefficients from lm in R

linear_regression

#1

Hello,

In linear regression we can get non standardized coefficients and also standardized coefficients.
I have two questions regarding this:
1.How do we generate a standardized coeff in R.One way is to standardize the variables before lm, but is there any option in lm(I could not find one) or any other package that can be used?
2.Standardizing removes the interpret-ability of the variables yet some say it is important to do that to bring the variables on the same scale so that one’s effect is not more than the other.I am of the opinion that standardizing is not really necessary in case of linear regression,but I might be wrong.
So can somebody please shed some light on these things!


#2

I think you can use the scale() function with lm function.

For example if a is your response variable and b is your predictor variable then you can use: lm(scale(a) ~ scale(b), data = “My Dataset”). This will give you scaled coefficients. Hope this clears your doubt.