In R, I am trying to reproduce the predict() output value of the orthogonal polynomial regression below. Based on my understanding of polynomial regression, I get 0.03869436 which is different from 0.05947406. Can anyone please help me by providing the explicit formulation of the predict output as a function of the fit model coefficients and p variable?
> q0 <- c(0.200,0.100,0.050,0.025) > p0 <- c(0.325,0.409,0.477,0.534) > p <- 0.4612118 > fit <- lm(q0 ~ poly(p0,3)) > predict(fit, newdata = list(p0 = p)) 1 0.05947406 > # which is not the same as f(p) = (beta_0) + (beta_1)*p + (beta_2)*(p^2) + (beta_3)*(p^3) below > as.numeric(fit$coefficients + fit$coefficients*p + fit$coefficients*(p^2) + fit$coefficients*(p^3))  0.03869436
My internet searches have not turned up anything yet. Thank you.