search for: prodfn

Displaying 1 result from an estimated 1 matches for "prodfn".

2013 Nov 28
2
Find the prediction or the fitted values for an lm model
...my data with a 4th order polynomial. Now I have only 5 data point, I should have a polynomial that exactly pass the five point Then I would like to compute the "fitted" or "predict" value with a relatively large x dataset. How can I do it? BTW, I thought the model "prodfn" should pass by (0,0), but I just wonder why the const is unequal to zero x1<-c(0,3,4,5,8) y1<-c(0,1,4,7,8) prodfn<-lm(y1 ~ poly(x1, 4)) x<-seq(0,8,0.01) temp<-predict(prodfn,data.frame(x=x)) # This line does not work.. > prodfn Call: lm(formula = y1 ~ poly(x1, 4)) C...