Hi Tal,
That is correct. In the code, I actually call the same exact data.frame that
was used to create the object. I understand I can call predict() without a
data.frame to get this result, but I would like to predict other datasets as
well.
Thanks,
Harold
On Dec 5, 2010, at 7:18 AM, Tal
Your problem arises because predict() is using
the value d=10 whenever it evaluates poly(x,d,raw=TRUE).
The details are that this is the value that d in your
function polyModelSelection had when the function finished.
That value is stored in the environment
environment(poly.fit$models[[i]]$terms
Hi Harold,
I think the error stems from the data.frame you are entering into the
predict function.
Your data.frame must have the EXACT column name as the one used for the
creation of the model object.
Is that the case in your code?
Best,
Tal
Contact
Details:--
3 matches
Mail list logo