I have a explanatory variable that is centered using scale() that is used to predict a response variable:
d <- data.frame(
x=runif(100),
y=rnorm(100)
)
d <- within(d, s.x <- scale(x))
m1 <- lm(y~s.x, data=d)
I’d like to plot the predicted values, but using the original scale of x rather than the centered scale. Is there a way to sort of backtransform or reverse scale s.x?
Thanks!
Take a look at:
You can use the attributes to unscale:
For example: