У меня есть поясняющая переменная, которая центрируется с использованием scale()
, которая используется для прогнозирования переменной ответа:
d <- data.frame(
x=runif(100),
y=rnorm(100)
)
d <- within(d, s.x <- scale(x))
m1 <- lm(y~s.x, data=d)
Я хотел бы построить предсказанные значения, но используя исходный масштаб x
, а не по центру. Есть ли способ сортировки обратного преобразования или обратного масштаба s.x
?
Спасибо!