I have been trying to use the fpca regression provided in this packet. However, after browsing the documentation, I have not yet been able to find an example of how to do it.
I have tried the following:
Calling predict with the result of fpcr. For instance:
This does not work at all and throws the following error
Error in UseMethod("predict"): no applicable method for 'predict' applied to an object of class "fpcr"
Looking to work around this error, I tried to manually set the class of the object returned by fpcr to "gam", which gets rid of the error but then predict returns the prediction for the training dataset instead of the one provided in the call to predict.
I suspect that maybe calling predict with different parameters might solve these issues. However, I have tried several combinations to no avail. Could you please provide an example of the sequence of functions that have to be called to use the linear model created in pfcr as a predictor?
Hi,
I have been trying to use the fpca regression provided in this packet. However, after browsing the documentation, I have not yet been able to find an example of how to do it.
I have tried the following:
Calling predict with the result of fpcr. For instance:
This does not work at all and throws the following error
fpcr
to "gam", which gets rid of the error but thenpredict
returns the prediction for the training dataset instead of the one provided in the call topredict
.I suspect that maybe calling
predict
with different parameters might solve these issues. However, I have tried several combinations to no avail. Could you please provide an example of the sequence of functions that have to be called to use the linear model created in pfcr as a predictor?Thanks.