It seems odd to scale a categorical variable, but I need to get the correct coefficients for each of my variables in linear regression. Is it correct to scale the same way you would with continuous variables, or what is the right thing to do here?
For example if x is categorical and y is continuous:
model=lm(DV ~ scale(x) + scale(y), data=myData)
Is the above the right thing to do?
lmfunction, i.e., each level (minus the reference level) is encoded as one dummy of 0/1 values. There is no need for scaling since all dummies are on the same scale. Usingscalefor afactorvariable should throw an error. – Roland Sep 25 '14 at 09:28