Open ekhco opened 6 years ago
Just had this same issue. The fact the ticket was opened in 2017 doesn't give me much hope.
I've also tried things with rms and biglm to work around this and used rcs, all have similar issues.
I am committed to solving this problem for a grant, Using the original code, I find the issue is the handling of the "terms" sub-object.
> object.size(nsfit)
308056 bytes
> object.size(fit0)
9136 bytes
> fit0$terms <- nsfit$terms
> object.size(fit0)
9304 bytes
> predict(fit0, newdata=data.frame(x=1))
1
0.9332283
A problem I encounter when the .Environment is removed from terms is that natural splines no longer work when predicting: